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

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