[PATCH 1/3] Add and use RTEMS_CONTAINER_OF()

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Aug 5 07:36:41 UTC 2014


On 08/04/2014 03:59 PM, Gedare Bloom wrote:
>> >diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
>> >index 31dd289..f215911 100644
>> >--- a/cpukit/libblock/src/bdbuf.c
>> >+++ b/cpukit/libblock/src/bdbuf.c
>> >@@ -3178,8 +3178,8 @@ rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
>> >
>> >      while ((node = rtems_chain_get_unprotected (chain)) != NULL)
>> >      {
>> >-      rtems_disk_device *dd = (rtems_disk_device *)
>> >-        ((char *) node - offsetof (rtems_disk_device, read_ahead.node));
>> >+      rtems_disk_device *dd =
>> >+        RTEMS_CONTAINER_OF (node, rtems_disk_device, read_ahead.node);
> Delete the extra space between OF and (.
>

This file has its own style.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list