[riot-notifications] [RIOT-OS/RIOT] Do normal assignment instead of memcpy (#10728)

Kees Bakker notifications at github.com
Mon Jan 7 21:45:50 CET 2019


This commit is a collection of changes like this:
    memcpy(&dev->p, params, sizeof(hd44780_params_t));
into
    dev->p = *params;

In all these cases there is no good reason to use memcpy. The memcpy takes away
an opportunity for the compiler to check things. And the simple assignment is much
more readable.

Sorry for the long list, but I think it makes sense to do them all in one commit.
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/10728

-- Commit Summary --

  * Do normal assignment instead of memcpy

-- File Changes --

    M cpu/cc430/periph/rtc.c (2)
    M cpu/native/periph/rtc.c (4)
    M drivers/apa102/apa102.c (2)
    M drivers/at86rf2xx/at86rf2xx.c (2)
    M drivers/ata8520e/ata8520e.c (2)
    M drivers/bmx055/bmx055.c (2)
    M drivers/cc2420/cc2420.c (2)
    M drivers/dht/dht.c (2)
    M drivers/hd44780/hd44780.c (2)
    M drivers/hdc1000/hdc1000.c (2)
    M drivers/hts221/hts221.c (2)
    M drivers/kw2xrf/kw2xrf.c (2)
    M drivers/lpd8808/lpd8808.c (2)
    M drivers/mag3110/mag3110.c (2)
    M drivers/mma7660/mma7660.c (2)
    M drivers/mma8x5x/mma8x5x.c (2)
    M drivers/mpl3115a2/mpl3115a2.c (2)
    M drivers/mrf24j40/mrf24j40.c (2)
    M drivers/my9221/my9221.c (2)
    M drivers/rn2xx3/rn2xx3.c (2)
    M drivers/sdcard_spi/sdcard_spi.c (2)
    M drivers/si70xx/si70xx.c (2)
    M drivers/slipdev/slipdev.c (2)
    M drivers/sx127x/sx127x.c (2)
    M drivers/tcs37727/tcs37727.c (2)
    M drivers/tmp006/tmp006.c (2)
    M drivers/w5100/w5100.c (2)
    M drivers/xbee/xbee.c (2)
    M examples/asymcute_mqttsn/main.c (2)
    M tests/driver_sx127x/main.c (2)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/10728.patch
https://github.com/RIOT-OS/RIOT/pull/10728.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10728
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190107/599209be/attachment.html>


More information about the notifications mailing list