]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: use stdbool on reg.c
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 10 Mar 2009 02:28:49 +0000 (22:28 -0400)
committerJohannes Berg <johannes@sipsolutions.net>
Wed, 11 Mar 2009 13:44:46 +0000 (14:44 +0100)
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
reg.c

diff --git a/reg.c b/reg.c
index cb58ed9fd0544e6ba4f5aef5198404c15cbc18e5..74ae77f3229545d6524630e424180c5080b4fa5e 100644 (file)
--- a/reg.c
+++ b/reg.c
@@ -1,6 +1,7 @@
 #include <net/if.h>
 #include <errno.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include <netlink/genl/genl.h>
 #include <netlink/genl/family.h>
 #define DBM_TO_MBM(gain) ((gain) * 100)
 #define MBM_TO_DBM(gain) ((gain) / 100)
 
-static int isalpha_upper(char letter)
+static bool isalpha_upper(char letter)
 {
        if (letter >= 65 && letter <= 90)
-               return 1;
-       return 0;
+               return true;
+       return false;
 }
 
-static int is_alpha2(char *alpha2)
+static bool is_alpha2(char *alpha2)
 {
        if (isalpha_upper(alpha2[0]) && isalpha_upper(alpha2[1]))
-               return 1;
-       return 0;
+               return true;
+       return false;
 }
 
-static int is_world_regdom(char *alpha2)
+static bool is_world_regdom(char *alpha2)
 {
        /* ASCII 0 */
        if (alpha2[0] == 48 && alpha2[1] == 48)
-               return 1;
-       return 0;
+               return true;
+       return false;
 }
 
 static int handle_reg_set(struct nl_cb *cb,