[riot-notifications] [RIOT-OS/RIOT] drivers/bmx055: eliminate some casts (#10704)

Kees Bakker notifications at github.com
Sat Jan 5 15:41:25 CET 2019


First, every read function converts the void pointer into a const bmx055_t

Second, it is cleaner (more obvious) to pass phydat_t.val[3] instead of
type casting to int16_t* and relying that .val[3] is the first struct
member of phydat_t.

Notice that it wasn't tested but I'm fairly sure that the code behavior hasn't changed.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * drivers/bmx055: eliminate some casts

-- File Changes --

    M drivers/bmx055/bmx055_saul.c (12)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/10704.patch
https://github.com/RIOT-OS/RIOT/pull/10704.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/10704
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190105/bb2a5c38/attachment.html>


More information about the notifications mailing list