Module: wine Branch: master Commit: 01080e6750abcad22ac30df0e4efe669b458f8ab URL: http://source.winehq.org/git/wine.git/?a=commit;h=01080e6750abcad22ac30df0e4...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Feb 8 15:11:42 2017 +0300
setupapi: Use sizeof() instead of numerical constants for buffer sizes.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/setupapi/devinst.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 63e578c..ffb5fad 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -903,7 +903,7 @@ BOOL WINAPI SetupDiClassGuidsFromNameExW(
for (dwIndex = 0; ; dwIndex++) { - dwLength = 40; + dwLength = sizeof(szKeyName) / sizeof(WCHAR); lError = RegEnumKeyExW(hClassesKey, dwIndex, szKeyName, @@ -927,7 +927,7 @@ BOOL WINAPI SetupDiClassGuidsFromNameExW( return FALSE; }
- dwLength = 256 * sizeof(WCHAR); + dwLength = sizeof(szClassName); if (!RegQueryValueExW(hClassKey, Class, NULL,