From: Sergey Isakov Subject: tapi32: Simplify the logic in an if condition Message-Id: <7A8E3BE0-1195-418B-8BD8-1874D18FAF7F@bk.ru> Date: Fri, 27 Nov 2015 07:12:30 +0300 commit ed98df1038742648930765a34a59f13d850dc7eb Author: Sergey Isakov Date: Thu Nov 26 23:44:52 2015 +0300 tapi32: Simplify the logic in an if condition Signed-off-by: Sergey Isakov diff --git a/dlls/tapi32/assisted.c b/dlls/tapi32/assisted.c index 9e68a5c..0d707db 100644 --- a/dlls/tapi32/assisted.c +++ b/dlls/tapi32/assisted.c @@ -60,7 +60,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode) 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', 'T','e','l','e','p','h','o','n','y','\\','L','o','c','a','t','i','o','n','s',0}; - if(!RegOpenKeyW(HKEY_LOCAL_MACHINE, locations_keyW, &hkey) != ERROR_SUCCESS) { + if(RegOpenKeyW(HKEY_LOCAL_MACHINE, locations_keyW, &hkey) == ERROR_SUCCESS) { valsize = sizeof( DWORD); if(!RegQueryValueExW(hkey, currentidW, 0, &type, (LPBYTE) &currid, &valsize) && type == REG_DWORD) {