Merge branch 'bugfix' of https://github.com/YukiKita/fio
authorJens Axboe <axboe@fb.com>
Mon, 22 May 2017 16:23:25 +0000 (10:23 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 22 May 2017 16:23:25 +0000 (10:23 -0600)
json.c

diff --git a/json.c b/json.c
index e0227ec..2160d29 100644 (file)
--- a/json.c
+++ b/json.c
@@ -340,9 +340,13 @@ 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:
-               log_buf(out, "\"%s\"", value->string);
-               break;
+       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_INTEGER:
                log_buf(out, "%lld", value->integer_number);
                break;