[PATCH] shell32: remove useless NULL check (Coverity)

Marcus Meissner marcus at jet.franken.de
Thu Nov 19 02:10:03 CST 2009


Hi,

We check for NULL too late and the code in IPersistFolder3_Initialize
always kinda assumes the pidl is non-NULL.

-> remove the check

Ciao, Marcus
---
 dlls/shell32/shfldr_unixfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 9d4e956..921b9c0 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -1468,7 +1468,7 @@ static HRESULT WINAPI UnixFolder_IPersistFolder3_Initialize(IPersistFolder3* ifa
         current = ILGetNext(current);
     }
 
-    if (current && current->mkid.cb) {
+    if (current->mkid.cb) {
         if (_ILIsDrive(current)) {
             WCHAR wszDrive[4] = { '?', ':', '\\', 0 };
             wszDrive[0] = (WCHAR)*_ILGetTextPointer(current);
-- 
1.5.6



More information about the wine-patches mailing list