]> xenbits.xensource.com Git - libvirt.git/commitdiff
audit: remove redundant NULL assignment
authorJán Tomko <jtomko@redhat.com>
Thu, 18 Sep 2014 09:59:38 +0000 (11:59 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 18 Sep 2014 12:49:01 +0000 (14:49 +0200)
virVasprintf sets the output to NULL on failure.

src/util/viraudit.c

index 8023c6048c0b50d5220f5ee97c36c07ade1de897..d0ad9b9387a3ab7da3040943936a6d77dca019ea 100644 (file)
@@ -99,10 +99,8 @@ void virAuditSend(virLogSourcePtr source,
 #endif
 
     va_start(args, fmt);
-    if (virVasprintf(&str, fmt, args) < 0) {
+    if (virVasprintf(&str, fmt, args) < 0)
         VIR_WARN("Out of memory while formatting audit message");
-        str = NULL;
-    }
     va_end(args);
 
     if (auditlog && str) {