Michael Stefaniuc : user.exe16: Fix a misplaced closing bracket ( PVS-Studio).

Alexandre Julliard julliard at wine.codeweavers.com
Thu Oct 15 10:27:59 CDT 2015


Module: wine
Branch: master
Commit: 7be37c9874a74b508836bf9ddd311fe1e5eba5a4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7be37c9874a74b508836bf9ddd311fe1e5eba5a4

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Oct 14 21:36:33 2015 +0200

user.exe16: Fix a misplaced closing bracket (PVS-Studio).

Previous code was setting ret to 1 for negative return values of
vsnprintf; that would fail on glibc 2.0.6 and older.

Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user.exe16/user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c
index d16a1b4..aba797d 100644
--- a/dlls/user.exe16/user.c
+++ b/dlls/user.exe16/user.c
@@ -3244,7 +3244,7 @@ DWORD WINAPI FormatMessage16(
                         argliststart=args+insertnr-1;
 
                         /* CMF - This makes a BIG assumption about va_list */
-                        while ((ret = vsnprintf(b, sz, fmtstr, (va_list) argliststart) < 0) || (ret >= sz)) {
+                        while ((ret = vsnprintf(b, sz, fmtstr, (va_list) argliststart)) < 0 || ret >= sz) {
                             sz = (ret == -1 ? sz + 100 : ret + 1);
                             b = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, b, sz);
                         }




More information about the wine-cvs mailing list