summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-08-02 16:22:31 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-08-05 09:30:33 +0200
commit40dcafaf80a29c20d74594853a8ff04441eabd9c (patch)
tree1541f69ee011198bd995f38069a2b1300fc4de76 /cpukit/libblock
parentrbtree: Rename find header in find control (diff)
downloadrtems-40dcafaf80a29c20d74594853a8ff04441eabd9c.tar.bz2
Add and use RTEMS_CONTAINER_OF()
Diffstat (limited to 'cpukit/libblock')
-rw-r--r--cpukit/libblock/src/bdbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
index 31dd289393..f215911314 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);
rtems_blkdev_bnum block = dd->read_ahead.next;
rtems_blkdev_bnum media_block = 0;
rtems_status_code sc =