Michael Stefaniuc : regedit: Simplify check for an empty string ( PVS-Studio).
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 18 10:25:19 CST 2014
Module: wine
Branch: master
Commit: a542a13a02ac0e7de3c2c9706333cb7366d9f669
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a542a13a02ac0e7de3c2c9706333cb7366d9f669
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Tue Nov 18 10:25:22 2014 +0100
regedit: Simplify check for an empty string (PVS-Studio).
---
programs/regedit/framewnd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c
index 1635b50..0a56f94 100644
--- a/programs/regedit/framewnd.c
+++ b/programs/regedit/framewnd.c
@@ -286,7 +286,7 @@ static UINT_PTR CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, W
BOOL export_branch = FALSE;
WCHAR* path = GetItemFullPath(g_pChildWnd->hTreeWnd, NULL, FALSE);
SendDlgItemMessageW(hdlg, IDC_EXPORT_PATH, WM_SETTEXT, 0, (LPARAM)path);
- if (path && strlenW(path) > 0)
+ if (path && path[0])
export_branch = TRUE;
HeapFree(GetProcessHeap(), 0, path);
CheckRadioButton(hdlg, IDC_EXPORT_ALL, IDC_EXPORT_SELECTED, export_branch ? IDC_EXPORT_SELECTED : IDC_EXPORT_ALL);
More information about the wine-cvs
mailing list