diff --git a/reactos/subsys/system/regedit/edit.c b/reactos/subsys/system/regedit/edit.c index f348aae29ad..070559accb0 100644 --- a/reactos/subsys/system/regedit/edit.c +++ b/reactos/subsys/system/regedit/edit.c @@ -276,7 +276,7 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP TCHAR ValueString[32]; LPTSTR Remainder; DWORD Base; - DWORD Value; + DWORD Value = 0; switch(uMsg) { case WM_INITDIALOG: @@ -315,19 +315,11 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP { if ((len = GetWindowTextLength(hwndValue))) { - if (!GetWindowText(hwndValue, ValueString, 32)) - { - Value = 0; - } - else + if (GetWindowText(hwndValue, ValueString, 32)) { Value = _tcstoul (ValueString, &Remainder, 10); } } - else - { - Value = 0; - } } _stprintf (ValueString, _T("%lx"), Value); SetDlgItemText(hwndDlg, IDC_VALUE_DATA, ValueString); @@ -343,19 +335,11 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP { if ((len = GetWindowTextLength(hwndValue))) { - if (!GetWindowText(hwndValue, ValueString, 32)) - { - Value = 0; - } - else + if (GetWindowText(hwndValue, ValueString, 32)) { Value = _tcstoul (ValueString, &Remainder, 16); } } - else - { - Value = 0; - } } _stprintf (ValueString, _T("%lu"), Value); SetDlgItemText(hwndDlg, IDC_VALUE_DATA, ValueString);