X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=client.c;h=1dded0966cf9bcba261fb1fe5282d20bc3b67c94;hp=1f52734370527f6ff0bfcf595234fa0a9b282609;hb=9a4424c81b146b9a08b105af9e53d8435e888cd1;hpb=02975b649c986efbafdb76b3ddff998634610e3f diff --git a/client.c b/client.c index 1f527343..1dded096 100644 --- a/client.c +++ b/client.c @@ -823,9 +823,11 @@ static void convert_gs(struct group_run_stats *dst, struct group_run_stats *src) } static void json_object_add_client_info(struct json_object *obj, -struct fio_client *client) + struct fio_client *client) { - json_object_add_value_string(obj, "hostname", client->hostname); + const char *hostname = client->hostname ? client->hostname : ""; + + json_object_add_value_string(obj, "hostname", hostname); json_object_add_value_int(obj, "port", client->port); }