From 21c9e72822b3a2a7bf71c965b336d71d8cdeb22f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 16 Sep 2016 09:27:41 -0600 Subject: [PATCH] client: coding style fixups Signed-off-by: Jens Axboe --- client.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index 4121ea5f..9698122d 100644 --- a/client.c +++ b/client.c @@ -1304,8 +1304,7 @@ static int fio_client_handle_iolog(struct fio_client *client, } /* allocate buffer big enough for next sprintf() call */ - log_pathname = malloc( 10 + - strlen((char * )pdu->name) + + log_pathname = malloc(10 + strlen((char *)pdu->name) + strlen(client->hostname)); if (!log_pathname) { log_err("fio: memory allocation of unique pathname failed"); @@ -1322,7 +1321,7 @@ static int fio_client_handle_iolog(struct fio_client *client, fd = open((const char *) log_pathname, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (fd < 0) { - log_err("fio: open log %s: %s\n", + log_err("fio: open log %s: %s\n", log_pathname, strerror(errno)); return 1; } @@ -1341,7 +1340,7 @@ static int fio_client_handle_iolog(struct fio_client *client, FILE *f; f = fopen((const char *) log_pathname, "w"); if (!f) { - log_err("fio: fopen log %s : %s\n", + log_err("fio: fopen log %s : %s\n", log_pathname, strerror(errno)); return 1; } -- 2.25.1