policycoreutils: use bool instead of int
PATCH 1/1 policycoreutils: use bool instead of int
Signed-off-by Kalevi Kolttonen <[email protected]>
--- policycoreutils/setsebool/setsebool.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
policycoreutils/setsebool/setsebool.c +7 -6
@@ -1,4 +1,5 @@#include <unistd.h> +#include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <string.h>
@@ -17,9 +18,9 @@#include <semanage/boolean_record.h> #include <errno.h> -static int permanent =0 ; -static int no_reload =0 ; -static int verbose =0 ; +static bool permanent = false; +static bool no_reload = false; +static bool verbose = false;int setbool (char **list,size_t start,size_t end);
@@ -44,13 +45,13 @@ int main(int argc, char **argv)switch (clflag) {case 'P' : - permanent =1 ; + permanent = true;break ;case 'N' : - no_reload =1 ; + no_reload = true;break ;case 'V' : - verbose =1 ; + verbose = true;break ;default :usage ();
Signature · 1 line
2.54.0
Quoted 2 lines · Kalevi Kolttonen
Signed-off-by Kalevi Kolttonen <[email protected]>
Acked-by Stephen Smalley <[email protected]>
Quoted 48 lines
--- policycoreutils/setsebool/setsebool.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)policycoreutils/setsebool/setsebool.c +7
-7@@ -1,4 +1,5 @@#include <unistd.h> +#include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -17,9 +18,9 @@#include <semanage/boolean_record.h> #include <errno.h> -static int permanent =0 ; -static int no_reload =0 ; -static int verbose =0 ; +static bool permanent = false; +static bool no_reload = false; +static bool verbose = false;int setbool (char **list,size_t start,size_t end);@@ -44,13 +45,13 @@ int main(int argc, char **argv)switch (clflag) {case 'P' : - permanent =1 ; + permanent = true;break ;case 'N' : - no_reload =1 ; + no_reload = true;break ;case 'V' : - verbose =1 ; + verbose = true;break ;default :usage (); --2.54.0