From 1a603a7b452675b0a1d8629b77a02cd05dfa0494 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez <alex@schedmd.com> Date: Thu, 24 Aug 2017 16:48:47 +0200 Subject: [PATCH] Fix Coverity CID 174746: Control flow issues (DEADCODE). Testing if curl_handle != NULL or rc != SLURM_SUCCESS was already done in the right above if/else statements, jumping to the consequent goto cleanup label if needed. Thus the removed test was never going to be evaluated to true, and Coverity properly warned about this. Regression introduced in commit 5f5e64726 (code cleanup). --- src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c b/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c index 4a0e5c7d33d..eb47a028956 100644 --- a/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c +++ b/src/plugins/jobcomp/elasticsearch/jobcomp_elasticsearch.c @@ -354,9 +354,6 @@ static int _index_job(const char *jobcomp) goto cleanup_easy_init; } - if (!curl_handle || (rc != SLURM_SUCCESS)) - goto cleanup_easy_init; - chunk.message = xmalloc(1); chunk.size = 0; -- GitLab