]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Remove incorrect check when encoding shmem audit message
authorJohn Ferlan <jferlan@redhat.com>
Mon, 10 Oct 2016 10:24:06 +0000 (06:24 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 10 Oct 2016 19:27:45 +0000 (15:27 -0400)
Remove the !size check since size is initialized to NULL and thus
causing the condition to always be true

src/conf/domain_audit.c

index fd20ace14cc8dbb63ab17b85c3667d61146cf324..2423f34b6b03b458b463e6ae5fe7ce4846030b82 100644 (file)
@@ -983,7 +983,7 @@ virDomainAuditShmem(virDomainObjPtr vm,
 
     virUUIDFormat(vm->def->uuid, uuidstr);
 
-    if (!vmname || !src || !size || !shmem ||
+    if (!vmname || !src || !shmem ||
         virAsprintfQuiet(&size, "%llu", def->size) < 0) {
         VIR_WARN("OOM while encoding audit message");
         goto cleanup;
@@ -997,7 +997,7 @@ virDomainAuditShmem(virDomainObjPtr vm,
 
     VIR_AUDIT(VIR_AUDIT_RECORD_RESOURCE, success,
               "virt=%s resrc=shmem reason=%s %s uuid=%s size=%s %s %s",
-              virt, reason, vmname, uuidstr, size ?: "?", shmem, src);
+              virt, reason, vmname, uuidstr, size, shmem, src);
 
  cleanup:
     VIR_FREE(vmname);