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 <[email protected]>
---
 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
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to