Marcus Meissner : msvcrt: Remove unnecessary NULL check (Coverity).
Alexandre Julliard
julliard at winehq.org
Fri Dec 4 09:11:28 CST 2009
Module: wine
Branch: master
Commit: 4da51e087d922431651c9bdec7151336d8471c05
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4da51e087d922431651c9bdec7151336d8471c05
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Fri Dec 4 10:10:48 2009 +0100
msvcrt: Remove unnecessary NULL check (Coverity).
---
dlls/msvcrt/wcs.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index 0f3e9ee..6e08822 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 );
More information about the wine-cvs
mailing list