forgot to attach a ptach itself ))

чт, 2 апр. 2020 г. в 15:04, Илья Шипицин <[email protected]>:

> Hello,
>
> this patch should resolve https://github.com/haproxy/haproxy/issues/553
>
> Cheers,
> Ilya Shipitcin
>
From 36dec6691e98dd92760c1434411aab207e43b93b Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <[email protected]>
Date: Thu, 2 Apr 2020 15:02:08 +0500
Subject: [PATCH] CLEANUP: src/fd.c: mask setsockopt with DISGUISE

we do not care of what is returned, let static analyzers to
know that
---
 src/fd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/fd.c b/src/fd.c
index d026b15ee..1934bd0e7 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -314,8 +314,8 @@ static void fd_dodelete(int fd, int do_close)
 
 	if (fdtab[fd].linger_risk) {
 		/* this is generally set when connecting to servers */
-		setsockopt(fd, SOL_SOCKET, SO_LINGER,
-			   (struct linger *) &nolinger, sizeof(struct linger));
+		DISGUISE(setsockopt(fd, SOL_SOCKET, SO_LINGER,
+			   (struct linger *) &nolinger, sizeof(struct linger)));
 	}
 	if (cur_poller.clo)
 		cur_poller.clo(fd);
-- 
2.25.1

Reply via email to