[PATCH v2 1/8] logging: allow inode/offset params to be NULL

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

 



Not all callers of virLogManagerDomainOpenLogFile will
care about getting the current inode/offset, so we should
allow those parameters to be NULL

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 src/logging/log_manager.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/logging/log_manager.c b/src/logging/log_manager.c
index f5b4b7d..7c37ba1 100644
--- a/src/logging/log_manager.c
+++ b/src/logging/log_manager.c
@@ -196,8 +196,10 @@ virLogManagerDomainOpenLogFile(virLogManagerPtr mgr,
         goto cleanup;
     }
 
-    *inode = ret.pos.inode;
-    *offset = ret.pos.offset;
+    if (inode)
+        *inode = ret.pos.inode;
+    if (offset)
+        *offset = ret.pos.offset;
 
     rv = fdout[0];
  cleanup:
-- 
2.5.0

--
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]