projects
/
project
/
iwinfo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4aa6c5a
)
fix -Wdangling-else warnings
author
Andre Heider
<a.heider@gmail.com>
Wed, 23 Nov 2022 13:43:13 +0000
(14:43 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Thu, 15 Dec 2022 19:07:49 +0000
(20:07 +0100)
It's less confusing with braces.
Signed-off-by: Andre Heider <a.heider@gmail.com>
iwinfo_cli.c
patch
|
blob
|
history
iwinfo_lua.c
patch
|
blob
|
history
diff --git
a/iwinfo_cli.c
b/iwinfo_cli.c
index 1ca899909d736b8acb96bb5ca81095fe766f6c19..b533ffe96fefa36ae2b8b1548a9b71c661971a3f 100644
(file)
--- 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 996f2911e2755c4c3279e08833fa55153bab72b9..ecf257d67678331425bbc2a8a496d20ba038a060 100644
(file)
--- 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--;