libkmod-config: replace 0/1 with bool
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 16 Feb 2017 16:57:01 +0000 (08:57 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 16 Feb 2017 16:57:01 +0000 (08:57 -0800)
libkmod/libkmod-config.c

index 0596025..18f300a 100644 (file)
@@ -496,8 +496,8 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)
 {
        char buf[KCMD_LINE_SIZE];
        int fd, err;
-       char *p, *modname,  *param = NULL, *value = NULL, is_module = 1;
-       bool is_quoted = false;
+       char *p, *modname,  *param = NULL, *value = NULL;
+       bool is_quoted = false, is_module = true;
 
        fd = open("/proc/cmdline", O_RDONLY|O_CLOEXEC);
        if (fd < 0) {
@@ -528,7 +528,7 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)
                                kcmdline_parse_result(config, modname, param, value);
                        param = value = NULL;
                        modname = p + 1;
-                       is_module = 1;
+                       is_module = true;
                        break;
                case '.':
                        if (param == NULL) {
@@ -540,7 +540,7 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)
                        if (param != NULL)
                                value = p + 1;
                        else
-                               is_module = 0;
+                               is_module = false;
                        break;
                }
        }