Michael Stefaniuc : appwiz.cpl: Simplify the check for an empty string ( PVS-Studio).
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Nov 14 07:30:17 CST 2014
Module: wine
Branch: master
Commit: bbff30f30e44fafbad4ebbac62d1d420c4fde8dd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bbff30f30e44fafbad4ebbac62d1d420c4fde8dd
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Fri Nov 14 10:51:38 2014 +0100
appwiz.cpl: Simplify the check for an empty string (PVS-Studio).
---
dlls/appwiz.cpl/appwiz.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c
index cd76f51..9d53e79 100644
--- a/dlls/appwiz.cpl/appwiz.c
+++ b/dlls/appwiz.cpl/appwiz.c
@@ -567,7 +567,7 @@ static void SetInfoDialogText(HKEY hKey, LPCWSTR lpKeyName, LPCWSTR lpAltMessage
/* if hKey is null, lpKeyName contains the string we want to check */
if (hKey == NULL)
{
- if ((lpKeyName) && (lstrlenW(lpKeyName) > 0))
+ if (lpKeyName && lpKeyName[0])
SetWindowTextW(hWndDlgItem, lpKeyName);
else
SetWindowTextW(hWndDlgItem, lpAltMessage);
@@ -577,7 +577,7 @@ static void SetInfoDialogText(HKEY hKey, LPCWSTR lpKeyName, LPCWSTR lpAltMessage
buflen = MAX_STRING_LEN;
if ((RegQueryValueExW(hKey, lpKeyName, 0, 0, (LPBYTE) buf, &buflen) ==
- ERROR_SUCCESS) && (lstrlenW(buf) > 0))
+ ERROR_SUCCESS) && buf[0])
SetWindowTextW(hWndDlgItem, buf);
else
SetWindowTextW(hWndDlgItem, lpAltMessage);
More information about the wine-cvs
mailing list