oleaut32/tests: Remove redundant NULL check before SysFreeString (Smatch).
Michael Stefaniuc
mstefani at redhat.de
Tue Sep 23 16:03:34 CDT 2008
This patch removes 100 Smatch "errors".
---
dlls/oleaut32/tests/varformat.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c
index 47fb8e6..00551e7 100644
--- a/dlls/oleaut32/tests/varformat.c
+++ b/dlls/oleaut32/tests/varformat.c
@@ -67,7 +67,7 @@ static inline int strcmpW( const WCHAR *str1, const WCHAR *str2 )
if (hres == S_OK) { \
ok(str && strcmpW(str,szResult1) == 0, \
"VarFormatNumber (vt %d): string different\n", vt); \
- if (str) SysFreeString(str); \
+ SysFreeString(str); \
}
static void test_VarFormatNumber(void)
@@ -137,7 +137,7 @@ static const char *szVarFmtFail = "VT %d|0x%04x Format %s: expected 0x%08x, '%s'
ok(hres == ret && (FAILED(ret) || !strcmp(buff, str)), \
szVarFmtFail, \
(vt)&VT_TYPEMASK,(vt)&~VT_TYPEMASK,fmt?fmt:"<null>",ret,str,hres,buff); \
- if (out) SysFreeString(out); \
+ SysFreeString(out); \
} while(0)
typedef struct tagFMTRES
--
1.6.0.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080923/c1d77bb8/attachment.pgp
More information about the wine-patches
mailing list