[PATCH] shlwapi: Remove redundant not-NULL check (coccinellery)

Michael Stefaniuc mstefani at winehq.org
Wed Feb 27 17:50:32 CST 2019


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
return E_FAIL if dest is NULL.


 dlls/shlwapi/string.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c
index d400f8befe..7b8473a379 100644
--- a/dlls/shlwapi/string.c
+++ b/dlls/shlwapi/string.c
@@ -1527,8 +1527,7 @@ HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest,
     if (!src)
     {
         WARN("Invalid lpStrRet would crash under Win32!\n");
-        if (dest)
-            *dest = '\0';
+        *dest = '\0';
         return E_FAIL;
     }
 
-- 
2.20.1




More information about the wine-devel mailing list