From: Andre Heider Date: Wed, 23 Nov 2022 13:43:13 +0000 (+0100) Subject: fix -Wdangling-else warnings X-Git-Url: http://git.openwrt.org/feed/routing.git;lede-17.01?a=commitdiff_plain;h=d6381634c28bfdc9701352146a82a4e8c35f4eff;p=project%2Fiwinfo.git fix -Wdangling-else warnings It's less confusing with braces. Signed-off-by: Andre Heider --- diff --git a/iwinfo_cli.c b/iwinfo_cli.c index 1ca8999..b533ffe 100644 --- a/iwinfo_cli.c +++ b/iwinfo_cli.c @@ -254,10 +254,12 @@ static char * format_encryption(struct iwinfo_crypto_entry *c) for (i = 0; i < 3; i++) if (c->wpa_version & (1 << i)) + { if (i) pos += sprintf(pos, "WPA%d/", i + 1); else pos += sprintf(pos, "WPA/"); + } pos--; diff --git a/iwinfo_lua.c b/iwinfo_lua.c index 996f291..ecf257d 100644 --- a/iwinfo_lua.c +++ b/iwinfo_lua.c @@ -155,10 +155,12 @@ static char * iwinfo_crypto_desc(struct iwinfo_crypto_entry *c) for (i = 0; i < 3; i++) if (c->wpa_version & (1 << i)) + { if (i) pos += sprintf(pos, "WPA%d/", i + 1); else pos += sprintf(pos, "WPA/"); + } pos--;