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

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


Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
return MultiByteToWideChar() if wcstr is NULL.


 dlls/msvcrt/mbcs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c
index 9b22adca1c..1ea8163296 100644
--- a/dlls/msvcrt/mbcs.c
+++ b/dlls/msvcrt/mbcs.c
@@ -2395,7 +2395,7 @@ MSVCRT_size_t CDECL MSVCRT__mbstowcs_l(MSVCRT_wchar_t *wcstr, const char *mbstr,
         }
     }
 
-    if(size<count && wcstr)
+    if(size<count)
         wcstr[size] = '\0';
 
     return size;
-- 
2.20.1




More information about the wine-devel mailing list