client: cleanup output types
[fio.git] / json.c
diff --git a/json.c b/json.c
index 2160d296445fae5cf5aebbd8fbdb91155bf71cfc..75212c85526544c0f1a9a236086e0fd7900f83ce 100644 (file)
--- a/json.c
+++ b/json.c
@@ -1,6 +1,5 @@
 #include <stdlib.h>
 #include <string.h>
-#include <stdio.h>
 #include <errno.h>
 #include <stdarg.h>
 #include "json.h"
@@ -340,13 +339,9 @@ static void json_print_array(struct json_array *array, struct buf_output *out)
 static void json_print_value(struct json_value *value, struct buf_output *out)
 {
        switch (value->type) {
-       case JSON_TYPE_STRING: {
-                       const char delimiter = '"';
-                       buf_output_add(out, &delimiter, sizeof(delimiter));
-                       buf_output_add(out, value->string, strlen(value->string));
-                       buf_output_add(out, &delimiter, sizeof(delimiter));
-                       break;
-               }
+       case JSON_TYPE_STRING:
+               log_buf(out, "\"%s\"", value->string);
+               break;
        case JSON_TYPE_INTEGER:
                log_buf(out, "%lld", value->integer_number);
                break;