Alexandre Julliard : setupapi/tests: Use FIELD_OFFSET instead of offsetof.

Alexandre Julliard julliard at winehq.org
Mon Mar 24 15:21:51 CDT 2008


Module: wine
Branch: master
Commit: 39fea9329cba3f0d6bc5d437e07136fe1d5fad4d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=39fea9329cba3f0d6bc5d437e07136fe1d5fad4d

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Mar 24 21:06:15 2008 +0100

setupapi/tests: Use FIELD_OFFSET instead of offsetof.

---

 dlls/setupapi/tests/devinst.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index dc6d9f7..ef0d8d6 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -649,7 +649,7 @@ static void testGetDeviceInterfaceDetail(void)
             /* Windows 2000 and up check for the exact size. Win9x returns ERROR_INVALID_PARAMETER
              * on every call (so doesn't get here) and NT4 doesn't have this function.
              */
-            detail->cbSize = offsetof(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath) + sizeof(char);
+            detail->cbSize = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath[1]);
             ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, detail,
                     size, &size, NULL);
             ok(ret, "SetupDiGetDeviceInterfaceDetailA failed: %d\n",




More information about the wine-cvs mailing list