[PATCH] daemon: Fix build without polkit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
Pushed under the build-breaker rule.

 daemon/libvirtd.c |   10 +++++-----
 daemon/remote.c   |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 62f089d..d1f80e4 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -874,7 +874,7 @@ static void
 daemonConfigFree(struct daemonConfig *data);
 
 static struct daemonConfig*
-daemonConfigNew(bool privileged)
+daemonConfigNew(bool privileged ATTRIBUTE_UNUSED)
 {
     struct daemonConfig *data;
     char *localhost;
@@ -1034,8 +1034,10 @@ daemonConfigLoad(struct daemonConfig *data,
      */
     if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) {
         VIR_FREE(data->unix_sock_rw_perms);
-        if (!(data->unix_sock_rw_perms = strdup("0777")))
-            goto no_memory;
+        if (!(data->unix_sock_rw_perms = strdup("0777"))) {
+            virReportOOMError();
+            goto error;
+        }
     }
 #endif
     if (remoteConfigGetAuth(conf, "auth_unix_ro", &data->auth_unix_ro, filename) < 0)
@@ -1091,8 +1093,6 @@ daemonConfigLoad(struct daemonConfig *data,
     virConfFree (conf);
     return 0;
 
-no_memory:
-    virReportOOMError();
 error:
     virConfFree (conf);
     return -1;
diff --git a/daemon/remote.c b/daemon/remote.c
index 47e47e4..9547702 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -2209,7 +2209,7 @@ authdeny:
 
 static int
 remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
-                         virNetServerClientPtr client,
+                         virNetServerClientPtr client ATTRIBUTE_UNUSED,
                          virNetMessageHeaderPtr hdr ATTRIBUTE_UNUSED,
                          virNetMessageErrorPtr rerr,
                          remote_auth_polkit_ret *ret ATTRIBUTE_UNUSED)
-- 
1.7.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]