[PATCH] shlwapi: Fix pointer and size in AssocQueryStringA

Juan Lang juan.lang at gmail.com
Thu Oct 16 18:37:04 CDT 2008


Hi Detlef,

-    if (dwLenOut >= MAX_PATH)
+    if (dwLenOut >= MAX_PATH) {
       lpszReturnW = HeapAlloc(GetProcessHeap(), 0,
                                       (dwLenOut + 1) * sizeof(WCHAR));
+    }
This first set of parentheses seems like an unnecessary addition..

+    else
+    {
+      dwLenOut = sizeof(szReturnW) / sizeof(szReturnW[0]);
+    }
and this one's style doesn't match the above.

The rest of the file doesn't appear to use braces with only a
single-line expression, so would you mind sticking with the existing
style?  Same with the next hunk, it introduces braces where none are
needed.

Thanks,
--Juan



More information about the wine-devel mailing list