[SYSDM]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 6 Aug 2016 12:15:16 +0000 (12:15 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 6 Aug 2016 12:15:16 +0000 (12:15 +0000)
- Less ambiguously check the return value of DialogBoxParam
CORE-11794

svn path=/trunk/; revision=72135

reactos/dll/cpl/sysdm/environment.c

index 02e3476..7a4fc54 100644 (file)
@@ -353,11 +353,11 @@ OnNewVariable(HWND hwndDlg,
 
     VarData = GlobalAlloc(GPTR, sizeof(VARIABLE_DATA));
 
 
     VarData = GlobalAlloc(GPTR, sizeof(VARIABLE_DATA));
 
-    if (!DialogBoxParam(hApplet,
-                        MAKEINTRESOURCE(IDD_EDIT_VARIABLE),
-                        hwndDlg,
-                        (DLGPROC)EditVariableDlgProc,
-                        (LPARAM)VarData) > 0)
+    if (DialogBoxParam(hApplet,
+                       MAKEINTRESOURCE(IDD_EDIT_VARIABLE),
+                       hwndDlg,
+                       EditVariableDlgProc,
+                       (LPARAM)VarData) <= 0)
     {
         if (VarData->lpName != NULL)
             GlobalFree(VarData->lpName);
     {
         if (VarData->lpName != NULL)
             GlobalFree(VarData->lpName);
@@ -412,7 +412,7 @@ OnEditVariable(HWND hwndDlg,
             if (DialogBoxParam(hApplet,
                                MAKEINTRESOURCE(IDD_EDIT_VARIABLE),
                                hwndDlg,
             if (DialogBoxParam(hApplet,
                                MAKEINTRESOURCE(IDD_EDIT_VARIABLE),
                                hwndDlg,
-                               (DLGPROC)EditVariableDlgProc,
+                               EditVariableDlgProc,
                                (LPARAM)VarData) > 0)
             {
                 ListView_SetItemText(hwndListView, iItem, 0, VarData->lpName);
                                (LPARAM)VarData) > 0)
             {
                 ListView_SetItemText(hwndListView, iItem, 0, VarData->lpName);