Module: wine Branch: master Commit: 9595ea7cd6d4b4b8f386b75e93aef4348c28d246 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9595ea7cd6d4b4b8f386b75e93...
Author: Kai Blin kai.blin@gmail.com Date: Fri Jan 5 12:11:21 2007 +0100
shlwapi: Remove redundant check in assignment, unicode version (Coverity).
---
dlls/shlwapi/reg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c index 3ad4ebc..fe77ddb 100644 --- a/dlls/shlwapi/reg.c +++ b/dlls/shlwapi/reg.c @@ -1459,7 +1459,7 @@ DWORD WINAPI SHQueryValueExW(HKEY hKey, if ((!pvData) || (dwRet == ERROR_MORE_DATA) ) { WCHAR cNull = '\0'; - nBytesToAlloc = (!pvData || (dwRet == ERROR_MORE_DATA)) ? dwUnExpDataLen : *pcbData; + nBytesToAlloc = dwUnExpDataLen;
szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc); RegQueryValueExW (hKey, lpszValue, lpReserved, NULL, (LPBYTE)szData, &nBytesToAlloc);