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

[libvirt] [PATCH 3/4] audit: remove redundant NULL assignment



virVasprintf sets the output to NULL on failure.
---
 src/util/viraudit.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/util/viraudit.c b/src/util/viraudit.c
index 8023c60..d0ad9b9 100644
--- a/src/util/viraudit.c
+++ b/src/util/viraudit.c
@@ -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) {
-- 
1.8.5.5


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