Michael Stefaniuc : shlwapi: Remove redundant "not NULL" checks of the len arg (coccicheck).

Alexandre Julliard julliard at winehq.org
Thu May 20 11:02:59 CDT 2010


Module: wine
Branch: master
Commit: f38336d82a05b4f470da3f515b606b6d29d73cfc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f38336d82a05b4f470da3f515b606b6d29d73cfc

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Thu May 20 01:14:19 2010 +0200

shlwapi: Remove redundant "not NULL" checks of the len arg (coccicheck).

---

 dlls/shlwapi/string.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c
index e00a925..a0269b6 100644
--- a/dlls/shlwapi/string.c
+++ b/dlls/shlwapi/string.c
@@ -1415,7 +1415,7 @@ HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest,
 	    break;
 
 	  case STRRET_CSTR:
-              if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len)
+              if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ))
                   dest[len-1] = 0;
 	    break;
 
@@ -1423,7 +1423,7 @@ HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest,
 	    if (pidl)
 	    {
               if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1,
-                                        dest, len ) && len)
+                                        dest, len ))
                   dest[len-1] = 0;
 	    }
 	    break;




More information about the wine-cvs mailing list