From 078f2e9f5ffe972bdb85b061027b8142fed83a5c Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 28 May 2005 19:38:54 +0000 Subject: [PATCH] Fix a warning. svn path=/trunk/; revision=15606 --- reactos/subsys/system/regedit/edit.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) 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);