mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] hush: pacify clang -Wparentheses-equality warning
@ 2023-04-04  9:05 Ahmad Fatoum
  2023-04-04 10:46 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-04-04  9:05 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Code is fine, but clang's -Wparentheses-equality warns when using double
parentheses in conditionals that don't do assignment. This aligns with
our code style as well, so change it to silence the warning.

No functional change.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/hush.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/hush.c b/common/hush.c
index 5138a1a45ae9..608c0e4937c1 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1837,7 +1837,7 @@ static char **make_list_in(char **inp, char *name)
 		p3 = insert_var_value(inp[i]);
 		p1 = p3;
 		while (*p1) {
-			if ((*p1 == ' ')) {
+			if (*p1 == ' ') {
 				p1++;
 				continue;
 			}
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-04 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04  9:05 [PATCH] hush: pacify clang -Wparentheses-equality warning Ahmad Fatoum
2023-04-04 10:46 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox