From b562a512eb1bc8b8113268c92b7b9ae3db7c67a7 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 24 Sep 2008 23:05:00 +0200 Subject: [PATCH] shlwapi/tests: Remove redundant NULL check before SysFreeString (Smatch). --- dlls/shlwapi/tests/string.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index 0875221095..4d9c17c2c7 100644 --- a/dlls/shlwapi/tests/string.c +++ b/dlls/shlwapi/tests/string.c @@ -664,16 +664,14 @@ static void test_StrRetToBSTR(void) ret = pStrRetToBSTR(&strret, NULL, &bstr); ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW), "STRRET_WSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr); - if (bstr) - SysFreeString(bstr); + SysFreeString(bstr); strret.uType = STRRET_CSTR; lstrcpyA(U(strret).cStr, "Test"); ret = pStrRetToBSTR(&strret, NULL, &bstr); ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW), "STRRET_CSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr); - if (bstr) - SysFreeString(bstr); + SysFreeString(bstr); strret.uType = STRRET_OFFSET; U(strret).uOffset = 1; @@ -681,8 +679,7 @@ static void test_StrRetToBSTR(void) ret = pStrRetToBSTR(&strret, iidl, &bstr); ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW), "STRRET_OFFSET: dup failed, ret=0x%08x, bstr %p\n", ret, bstr); - if (bstr) - SysFreeString(bstr); + SysFreeString(bstr); /* Native crashes if str is NULL */ }