diff options
| author | Andre Heider | 2022-11-23 13:43:13 +0000 |
|---|---|---|
| committer | Jo-Philipp Wich | 2022-12-15 19:07:49 +0000 |
| commit | d6381634c28bfdc9701352146a82a4e8c35f4eff (patch) | |
| tree | a03eec65c4ddcbae0238aee7881ccc078a7263fb | |
| parent | 4aa6c5a45cde865e6fc0a31f38aa151bdf73f448 (diff) | |
| download | iwinfo-d6381634c28bfdc9701352146a82a4e8c35f4eff.tar.gz | |
fix -Wdangling-else warnings
It's less confusing with braces.
Signed-off-by: Andre Heider <a.heider@gmail.com>
| -rw-r--r-- | iwinfo_cli.c | 2 | ||||
| -rw-r--r-- | iwinfo_lua.c | 2 |
2 files changed, 4 insertions, 0 deletions
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--; |