]> sourceware.org Git - lvm2.git/commit
Remove init_debug() calls immediately after create_toolcontext() call.
authorDave Wysochanski <dwysocha@redhat.com>
Thu, 11 Dec 2008 03:29:37 +0000 (03:29 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Thu, 11 Dec 2008 03:29:37 +0000 (03:29 +0000)
commitf6023a7c76425440bfdd15822d77773ce99b921e
tree386a475827d0382868336c9cf6399c1f12f3f268
parent6357a2d9b8db0587166f7b9980d226de26727ac0
Remove init_debug() calls immediately after create_toolcontext() call.

We can safely remove because create_toolcontext() calls _init_logging(),
which makes these calls:
        /* Debug level for log file output */
        cmd->default_settings.debug =
            find_config_tree_int(cmd, "log/level", DEFAULT_LOGLEVEL);
        init_debug(cmd->default_settings.debug);

Then at the bottom of create_toolcontext() we do this:
        cmd->current_settings = cmd->default_settings;

So the call we are removing from init_lvm() functions (clvmd and lvmcmdline):
        init_debug(cmd->current_settings.debug);

Just sets the value of debug based on 'cmd->current_settings.debug'.
Since cmd->current_settings is equivalent to cmd->default_settings, and
init_debug() was called with cmd->default_settings, the call we remove is
redundant.
daemons/clvmd/lvm-functions.c
tools/lvmcmdline.c
This page took 0.040839 seconds and 5 git commands to generate.