From 39fea9329cba3f0d6bc5d437e07136fe1d5fad4d Mon Sep 17 00:00:00 2001
From: Alexandre Julliard <julliard@winehq.org>
Date: Mon, 24 Mar 2008 21:06:15 +0100
Subject: [PATCH] setupapi/tests: Use FIELD_OFFSET instead of offsetof.

---
 dlls/setupapi/tests/devinst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index dc6d9f70e60..ef0d8d66b4c 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",
-- 
GitLab