fix -Wdangling-else warnings
It's less confusing with braces. Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
parent
4aa6c5a45c
commit
d6381634c2
2 changed files with 4 additions and 0 deletions
|
@ -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--;
|
||||
|
||||
|
|
|
@ -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--;
|
||||
|
||||
|
|
Loading…
Reference in a new issue