]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add a default log_level to qemudSetLogging to remove a build warning.
authorChris Lalancette <clalance@redhat.com>
Fri, 23 Oct 2009 06:56:21 +0000 (08:56 +0200)
committerChris Lalancette <clalance@redhat.com>
Mon, 26 Oct 2009 09:31:16 +0000 (10:31 +0100)
(original patch from Charles Duffy)

Signed-off-by: Chris Lalancette <clalance@redhat.com>
daemon/libvirtd.c

index 03bc1b459a9b0c197f4365cbde4655624dc4be07..4eb33bcd120775cb41bf44fe9b22860a9eac5ce1 100644 (file)
@@ -2509,8 +2509,9 @@ remoteReadSaslAllowedUsernameList (virConfPtr conf ATTRIBUTE_UNUSED,
  * debugging is asked for then output informations or debug.
  */
 static int
-qemudSetLogging(virConfPtr conf, const char *filename) {
-    int log_level;
+qemudSetLogging(virConfPtr conf, const char *filename)
+{
+    int log_level = 0;
     char *log_filters = NULL;
     char *log_outputs = NULL;
     int ret = -1;
@@ -2531,12 +2532,6 @@ qemudSetLogging(virConfPtr conf, const char *filename) {
      * level has been set, we must process variables in the opposite
      * order, each one overriding the previous.
      */
-    /*
-     * GET_CONF_INT returns 0 when there is no log_level setting in
-     * the config file. The conditional below eliminates a false
-     * warning in that case, but also has the side effect of missing
-     * a warning if the user actually does say log_level=0.
-     */
     GET_CONF_INT (conf, filename, log_level);
     if (log_level != 0)
         virLogSetDefaultPriority(log_level);