arrfab / rpms / libreport

Forked from rpms/libreport 5 years ago
Clone
Blob Blame History Raw
From 7cbf5a9b3613985358aad07b6365f6c5cf06a4cf Mon Sep 17 00:00:00 2001
From: Martin Kutlak <mkutlak@redhat.com>
Date: Mon, 20 Aug 2018 16:52:13 +0200
Subject: [PATCH] coverity: Remove check for null pointer with no effect #def33

post_state->errmsg is defined as a char array, NULL is a pointer - these
are incompatible types. Comparing them always evaluates as False.

Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
---
 src/lib/ureport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ureport.c b/src/lib/ureport.c
index c32c948a..ced48108 100644
--- a/src/lib/ureport.c
+++ b/src/lib/ureport.c
@@ -570,7 +570,7 @@ ureport_server_response_from_reply(post_state_t *post_state,
      */
     if (post_state->curl_result != CURLE_OK)
     {
-        if (post_state->errmsg != NULL && strcmp( post_state->errmsg, "") != 0)
+        if (strcmp(post_state->errmsg, "") != 0)
             error_msg(_("Failed to upload uReport to the server '%s' with curl: %s"),
                                                                     config->ur_url,
                                                                     post_state->errmsg);
-- 
2.17.1