Browse Source

fix -Wdangling-else warnings

It's less confusing with braces.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Andre Heider 1 year ago
parent
commit
d6381634c2
2 changed files with 4 additions and 0 deletions
  1. 2 0
      iwinfo_cli.c
  2. 2 0
      iwinfo_lua.c

+ 2 - 0
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--;
 

+ 2 - 0
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--;