Blame SOURCES/0243-coverity-Remove-check-for-null-pointer-with-no-effec.patch

b12e4c
From ba9cd5fe311ae3b89770050f846d2d6b246a49fe Mon Sep 17 00:00:00 2001
b12e4c
From: Martin Kutlak <mkutlak@redhat.com>
b12e4c
Date: Mon, 20 Aug 2018 14:52:13 +0000
b12e4c
Subject: [PATCH] coverity: Remove check for null pointer with no effect #def33
b12e4c
b12e4c
post_state->errmsg is defined as a char array, NULL is a pointer - these
b12e4c
are incompatible types. Comparing them always evaluates as False.
b12e4c
b12e4c
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
b12e4c
b12e4c
b12e4c
(cherry picked from commit 7cbf5a9b3613985358aad07b6365f6c5cf06a4cf)
b12e4c
---
b12e4c
 src/lib/ureport.c | 2 +-
b12e4c
 1 file changed, 1 insertion(+), 1 deletion(-)
b12e4c
b12e4c
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
b12e4c
index 490b75c..af41c1c 100644
b12e4c
--- a/src/lib/ureport.c
b12e4c
+++ b/src/lib/ureport.c
b12e4c
@@ -566,7 +566,7 @@ ureport_server_response_from_reply(post_state_t *post_state,
b12e4c
      */
b12e4c
     if (post_state->curl_result != CURLE_OK)
b12e4c
     {
b12e4c
-        if (post_state->errmsg != NULL && strcmp( post_state->errmsg, "") != 0)
b12e4c
+        if (strcmp(post_state->errmsg, "") != 0)
b12e4c
             error_msg(_("Failed to upload uReport to the server '%s' with curl: %s"),
b12e4c
                                                                     config->ur_url,
b12e4c
                                                                     post_state->errmsg);
b12e4c
-- 
b12e4c
2.21.0
b12e4c