Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
960ae6fe
Commit
960ae6fe
authored
Jul 21, 2008
by
Reece Dunn
Committed by
Alexandre Julliard
Jul 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi/tests: Use FIELD_OFFSET instead of offsetof.
parent
c7ce692d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
devinst.c
dlls/setupapi/tests/devinst.c
+2
-2
No files found.
dlls/setupapi/tests/devinst.c
View file @
960ae6fe
...
...
@@ -824,7 +824,7 @@ static void testGetDeviceInterfaceDetail(void)
LPBYTE
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
SP_DEVICE_INTERFACE_DETAIL_DATA_A
*
detail
=
(
SP_DEVICE_INTERFACE_DETAIL_DATA_A
*
)
buf
;
DWORD
expectedsize
=
offsetof
(
SP_DEVICE_INTERFACE_DETAIL_DATA_W
,
DevicePath
)
+
sizeof
(
WCHAR
)
*
(
1
+
strlen
(
path
));
DWORD
expectedsize
=
FIELD_OFFSET
(
SP_DEVICE_INTERFACE_DETAIL_DATA_W
,
DevicePath
)
+
sizeof
(
WCHAR
)
*
(
1
+
strlen
(
path
));
detail
->
cbSize
=
0
;
SetLastError
(
0xdeadbeef
);
...
...
@@ -1101,7 +1101,7 @@ static void testRegisterAndGetDetail(void)
detail
=
(
PSP_DEVICE_INTERFACE_DETAIL_DATA_A
)
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
if
(
detail
)
{
detail
->
cbSize
=
offsetof
(
SP_DEVICE_INTERFACE_DETAIL_DATA_A
,
DevicePath
)
+
sizeof
(
char
);
detail
->
cbSize
=
FIELD_OFFSET
(
SP_DEVICE_INTERFACE_DETAIL_DATA_A
,
DevicePath
)
+
sizeof
(
char
);
SetLastError
(
0xdeadbeef
);
ret
=
pSetupDiGetDeviceInterfaceDetailA
(
set
,
&
interfaceData
,
detail
,
dwSize
,
&
dwSize
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment