[PATCH] setupapi: Use sizeof() instead of numerical constants for buffer sizes
Nikolay Sivov
nsivov at codeweavers.com
Wed Feb 8 06:11:42 CST 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
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 63e578c7e4..ffb5fad1bf 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,
--
2.11.0
More information about the wine-patches
mailing list