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

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