libmultipath: remove superfluous conditionals in load_config()
authorMartin Wilck <mwilck@suse.com>
Fri, 8 Jun 2018 10:20:16 +0000 (12:20 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 21 Jun 2018 07:38:42 +0000 (09:38 +0200)
In load_config(), conf is freshly allocated, there's no point in checking
previously set values.

Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/config.c

index d6e1ca9..896d502 100644 (file)
@@ -608,8 +608,7 @@ load_config (char * file)
        /*
         * internal defaults
         */
-       if (!conf->verbosity)
-               conf->verbosity = DEFAULT_VERBOSITY;
+       conf->verbosity = DEFAULT_VERBOSITY;
 
        get_sys_max_fds(&conf->max_fds);
        conf->bindings_file = set_default(DEFAULT_BINDINGS_FILE);
@@ -636,12 +635,9 @@ load_config (char * file)
        /*
         * preload default hwtable
         */
-       if (conf->hwtable == NULL) {
-               conf->hwtable = vector_alloc();
-
-               if (!conf->hwtable)
+       conf->hwtable = vector_alloc();
+       if (!conf->hwtable)
                        goto out;
-       }
        if (setup_default_hwtable(conf->hwtable))
                goto out;