X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=json.c;h=75212c85526544c0f1a9a236086e0fd7900f83ce;hp=f3ec0bb45f0852dde21d9cdbf0de97e46725a371;hb=5d665e96ca02da02210606c3eed0489f78f06310;hpb=f672ef67527a27eb2bbc59aa6041a42d88a00838 diff --git a/json.c b/json.c index f3ec0bb4..75212c85 100644 --- a/json.c +++ b/json.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include "json.h" @@ -40,7 +39,7 @@ static struct json_value *json_create_value_int(long long number) return value; } -static struct json_value *json_create_value_float(float number) +static struct json_value *json_create_value_float(double number) { struct json_value *value = malloc(sizeof(struct json_value)); @@ -347,7 +346,7 @@ static void json_print_value(struct json_value *value, struct buf_output *out) log_buf(out, "%lld", value->integer_number); break; case JSON_TYPE_FLOAT: - log_buf(out, "%.2f", value->float_number); + log_buf(out, "%f", value->float_number); break; case JSON_TYPE_OBJECT: json_print_object(value->object, out);