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