]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
daemon: Fix build without polkit
authorJiri Denemark <jdenemar@redhat.com>
Tue, 28 Jun 2011 19:09:05 +0000 (21:09 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 28 Jun 2011 19:09:05 +0000 (21:09 +0200)
daemon/libvirtd.c
daemon/remote.c

index 62f089dd4cfc7782e0c62b97b7b8f74ef8f5061e..d1f80e4594c1da0aaac4f77f7fc64aeab07b3b0a 100644 (file)
@@ -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;
index 47e47e44835e6fd4cb2c3ecb2fd37dea0e4f8e8f..9547702961f07439eba1e03ed5eb001a90fc9864 100644 (file)
@@ -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)