On 12/7/18 11:12 AM, Michael Trapp wrote:
---
  libmetrics/libmetrics.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libmetrics/libmetrics.c b/libmetrics/libmetrics.c
index 0a5e3ee..36c7f5f 100644
--- a/libmetrics/libmetrics.c
+++ b/libmetrics/libmetrics.c
@@ -681,8 +681,8 @@ int dump_metrics(const char *dest_file)
      }
if (fwrite(mdisk->buffer, 1, mdisk->length, fp) != mdisk->length) {
-        libmsg("Error, unable to export metrics to file:%s - error:%s\n",
-                dest_file, strerror(errno));
+        libmsg("Error, unable to export metrics to file:%s - error:%s\n",
+                dest_file ? dest_file : "stdout", strerror(errno));
      }
      if (dest_file)
          fclose(fp);


Trivial fix, thanks! I did change the commit summary before pushing

  Don't pass NULL string to library log function

Regards,
Jim

_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to