]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: json: Don't bother logging output string in virJSONValueToString
authorPeter Krempa <pkrempa@redhat.com>
Fri, 29 Mar 2019 12:48:22 +0000 (13:48 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 3 Apr 2019 09:58:10 +0000 (11:58 +0200)
We have tests that validate the XML formatter. Additionally almost every
guide tells users to disable JSON logging. Drop logging of output string
in virJSONValueToString.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
src/util/virjson.c

index 7dfc5899447cac3656e6307597869b607fc1b7a3..19857d2f2f47cd6e448f44f386f9f7b0980cb75d 100644 (file)
@@ -2048,16 +2048,11 @@ virJSONValueToString(virJSONValuePtr object,
                      bool pretty)
 {
     VIR_AUTOCLEAN(virBuffer) buf = VIR_BUFFER_INITIALIZER;
-    char *ret = NULL;
 
     if (virJSONValueToBuffer(object, &buf, pretty) < 0)
         return NULL;
 
-    ret = virBufferContentAndReset(&buf);
-
-    VIR_DEBUG("result=%s", NULLSTR(ret));
-
-    return ret;
+    return virBufferContentAndReset(&buf);
 }