From 4da51e087d922431651c9bdec7151336d8471c05 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 4 Dec 2009 10:10:48 +0100 Subject: [PATCH] msvcrt: Remove unnecessary NULL check (Coverity). --- dlls/msvcrt/wcs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 0f3e9eecf25..6e08822c909 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -810,12 +810,9 @@ int CDECL MSVCRT_vsnprintf( char *str, unsigned int len, out.used = 0; out.len = len; - if( format ) - { - sz = MultiByteToWideChar( CP_ACP, 0, format, -1, NULL, 0 ); - formatW = HeapAlloc( GetProcessHeap(), 0, sz*sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, format, -1, formatW, sz ); - } + sz = MultiByteToWideChar( CP_ACP, 0, format, -1, NULL, 0 ); + formatW = HeapAlloc( GetProcessHeap(), 0, sz*sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, format, -1, formatW, sz ); r = pf_vsnprintf( &out, formatW, valist ); -- 2.11.4.GIT