Michael Stefaniuc : wintrust: Remove redundant not-NULL checks ( coccinellery).

Alexandre Julliard julliard at winehq.org
Fri Feb 22 15:22:10 CST 2019


Module: wine
Branch: master
Commit: 2b8d9764ea4aa50c7b4091385df8f9562ffe0ca5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2b8d9764ea4aa50c7b4091385df8f9562ffe0ca5

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Thu Feb 21 20:35:35 2019 +0100

wintrust: Remove redundant not-NULL checks (coccinellery).

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wintrust/wintrust_main.c | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c
index 58e3ac3..7db0b47 100644
--- a/dlls/wintrust/wintrust_main.c
+++ b/dlls/wintrust/wintrust_main.c
@@ -309,13 +309,11 @@ static LONG WINTRUST_DefaultVerify(HWND hwnd, GUID *actionID,
     goto done;
 
 error:
-    if (provData)
-    {
-        WINTRUST_Free(provData->padwTrustStepErrors);
-        WINTRUST_Free(provData->u.pPDSip);
-        WINTRUST_Free(provData->psPfns);
-        WINTRUST_Free(provData);
-    }
+    WINTRUST_Free(provData->padwTrustStepErrors);
+    WINTRUST_Free(provData->u.pPDSip);
+    WINTRUST_Free(provData->psPfns);
+    WINTRUST_Free(provData);
+
 done:
     TRACE("returning %08x\n", err);
     return err;
@@ -502,13 +500,11 @@ static LONG WINTRUST_CertVerify(HWND hwnd, GUID *actionID,
     goto done;
 
 error:
-    if (provData)
-    {
-        WINTRUST_Free(provData->padwTrustStepErrors);
-        WINTRUST_Free(provData->u.pPDSip);
-        WINTRUST_Free(provData->psPfns);
-        WINTRUST_Free(provData);
-    }
+    WINTRUST_Free(provData->padwTrustStepErrors);
+    WINTRUST_Free(provData->u.pPDSip);
+    WINTRUST_Free(provData->psPfns);
+    WINTRUST_Free(provData);
+
 done:
     TRACE("returning %08x\n", err);
     return err;




More information about the wine-cvs mailing list