From: Luis R. Rodriguez Date: Tue, 10 Mar 2009 02:28:49 +0000 (-0400) Subject: iw: use stdbool on reg.c X-Git-Tag: v0.9.10~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ffc08bcb02c426bd0a7a3b33a6068543a03d3cf5;p=thirdparty%2Fiw.git iw: use stdbool on reg.c Signed-off-by: Luis R. Rodriguez --- diff --git a/reg.c b/reg.c index cb58ed9..74ae77f 100644 --- a/reg.c +++ b/reg.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -18,26 +19,26 @@ #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,