From 2187c3feae24e5f218109e33287a5aa6d979f213 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 9 Jan 2023 17:25:58 +0100 Subject: [PATCH] token: Avoid warnings with extraneous parentheses The FreeBSD builder complains like this: /home/gitlab-runner/builds/jtxr_hfi/0/jjelen/libssh-mirror/src/token.c:438:15: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((list == NULL)) { ~~~~~^~~~~~~ /home/gitlab-runner/builds/jtxr_hfi/0/jjelen/libssh-mirror/src/token.c:438:15: note: remove extraneous parentheses around the comparison to silence this warning if ((list == NULL)) { ~ ^ ~ /home/gitlab-runner/builds/jtxr_hfi/0/jjelen/libssh-mirror/src/token.c:438:15: note: use '=' to turn this equality comparison into an assignment if ((list == NULL)) { ^~ = 1 warning generated. Signed-off-by: Jakub Jelen Reviewed-by: Norbert Pocs --- src/token.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.c b/src/token.c index 58befe1d..b41e6190 100644 --- a/src/token.c +++ b/src/token.c @@ -435,7 +435,7 @@ char *ssh_remove_all_matching(const char *list, size_t len, pos = 0; bool exclude; - if ((list == NULL)) { + if (list == NULL) { return NULL; } if (remove_list == NULL) {