Hi again,

This is tiny one, this one I just spotted when I tried a build on FreeBSD
with clang.

clang detected unused functions as well but I did not dare to delete them,
they might but just here "on hold" for future purposes (ie
init_comp_ctx/deinit_comp_ctx and had_fd_isset in src/ev_poll.c).

Kind regards.
From 377ae8167a051d0209d04b702bcbc5e78d64d53c Mon Sep 17 00:00:00 2001
From: David CARLIER <[email protected]>
Date: Thu, 24 Mar 2016 09:22:36 +0000
Subject: [PATCH] CLEANUP: connection: adding missing parenthesis

Nothing harmful in here, just clarify that it applies to the whole
expression.
---
 src/connection.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/connection.c b/src/connection.c
index 6eab5e1..1d73e24 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -385,7 +385,7 @@ int conn_recv_proxy(struct connection *conn, int flag)
 	if (trash.len < 9) /* shortest possible line */
 		goto missing;
 
-	if (!memcmp(line, "TCP4 ", 5) != 0) {
+	if (!(memcmp(line, "TCP4 ", 5) != 0)) {
 		u32 src3, dst3, sport, dport;
 
 		line += 5;
@@ -426,7 +426,7 @@ int conn_recv_proxy(struct connection *conn, int flag)
 		((struct sockaddr_in *)&conn->addr.to)->sin_port          = htons(dport);
 		conn->flags |= CO_FL_ADDR_FROM_SET | CO_FL_ADDR_TO_SET;
 	}
-	else if (!memcmp(line, "TCP6 ", 5) != 0) {
+	else if (!(memcmp(line, "TCP6 ", 5) != 0)) {
 		u32 sport, dport;
 		char *src_s;
 		char *dst_s, *sport_s, *dport_s;
-- 
2.7.4

Reply via email to