Hello,

let us clean up non important finding by wrapping it with DISGUISE(..)


Cheers,
Ilya Shipitcin
From 7060a886a76452245ec466f6f7aaf28d504c9c3f Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <chipits...@gmail.com>
Date: Sat, 23 May 2020 15:35:36 +0500
Subject: [PATCH] CLEANUP: src/checks.c: ignore return value using DISGUISE(..)

we do not want to check status of extchk_setenv, but static analyzsers
like Coverity are not happy about it. Let calm coverity down.
---
 src/checks.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/checks.c b/src/checks.c
index 01a27f87e..ea99145bd 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -3208,15 +3208,15 @@ static int connect_proc_chk(struct task *t)
 		environ = check->envp;
 
 		/* Update some environment variables and command args: curconn, server addr and server port */
-		extchk_setenv(check, EXTCHK_HAPROXY_SERVER_CURCONN, ultoa_r(s->cur_sess, buf, sizeof(buf)));
+		DISGUISE(extchk_setenv(check, EXTCHK_HAPROXY_SERVER_CURCONN, ultoa_r(s->cur_sess, buf, sizeof(buf))));
 
 		addr_to_str(&s->addr, check->argv[3], EXTCHK_SIZE_ADDR);
-		extchk_setenv(check, EXTCHK_HAPROXY_SERVER_ADDR, check->argv[3]);
+		DISGUISE(extchk_setenv(check, EXTCHK_HAPROXY_SERVER_ADDR, check->argv[3]));
 
 		*check->argv[4] = 0;
 		if (s->addr.ss_family == AF_INET || s->addr.ss_family == AF_INET6)
 			snprintf(check->argv[4], EXTCHK_SIZE_UINT, "%u", s->svc_port);
-		extchk_setenv(check, EXTCHK_HAPROXY_SERVER_PORT, check->argv[4]);
+		DISGUISE(extchk_setenv(check, EXTCHK_HAPROXY_SERVER_PORT, check->argv[4]));
 
 		haproxy_unblock_signals();
 		execvp(px->check_command, check->argv);
-- 
2.26.2

Reply via email to