summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptmv/vdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/hptmv/vdevice.h')
-rw-r--r--sys/dev/hptmv/vdevice.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/hptmv/vdevice.h b/sys/dev/hptmv/vdevice.h
index e0bddc7..c7f96da 100644
--- a/sys/dev/hptmv/vdevice.h
+++ b/sys/dev/hptmv/vdevice.h
@@ -77,8 +77,8 @@ typedef struct _VDevice
} VDevice;
-#define ARRAY_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(RaidArray))
-#define DISK_VDEV_SIZE ((UINT)(ULONG_PTR)&((PVDevice)0)->u+sizeof(Device))
+#define ARRAY_VDEV_SIZE (offsetof(VDevice, u) + sizeof(RaidArray))
+#define DISK_VDEV_SIZE (offsetof(VDevice, u) + sizeof(Device))
#define Map2pVDevice(pDev) ((PVDevice)((UINT_PTR)pDev - (UINT)(UINT_PTR)&((PVDevice)0)->u.disk))
OpenPOWER on IntegriCloud