Michael Stefaniuc : mscms/tests: Simplify the check for an empty string ( PVS-Studio).
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 17 07:43:45 CST 2014
Module: wine
Branch: master
Commit: de092c6bd397aa9d9a72947b1d24d7a2393db62b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=de092c6bd397aa9d9a72947b1d24d7a2393db62b
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Mon Nov 17 10:59:05 2014 +0100
mscms/tests: Simplify the check for an empty string (PVS-Studio).
---
dlls/mscms/tests/profile.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/mscms/tests/profile.c b/dlls/mscms/tests/profile.c
index fd35193..012a7dc 100644
--- a/dlls/mscms/tests/profile.c
+++ b/dlls/mscms/tests/profile.c
@@ -1364,10 +1364,10 @@ START_TEST(profile)
/* See if we can find the standard color profile */
ret = GetSystemDirectoryA( profilefile1, sizeof(profilefile1) );
ok( ret > 0, "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError());
- ok( lstrlenA(profilefile1) > 0 && lstrlenA(profilefile1) < MAX_PATH,
+ ok(profilefile1[0] && lstrlenA(profilefile1) < MAX_PATH,
"Expected length between 0 and MAX_PATH, got %d\n", lstrlenA(profilefile1));
MultiByteToWideChar(CP_ACP, 0, profilefile1, -1, profilefile1W, MAX_PATH);
- ok( lstrlenW(profilefile1W) > 0 && lstrlenW(profilefile1W) < MAX_PATH,
+ ok(profilefile1W[0] && lstrlenW(profilefile1W) < MAX_PATH,
"Expected length between 0 and MAX_PATH, got %d\n", lstrlenW(profilefile1W));
lstrcpyA(profilefile2, profilefile1);
lstrcpyW(profilefile2W, profilefile1W);
More information about the wine-cvs
mailing list