From 4a4c21bfbad3cf84133fa57bd58995f887dd81c4 Mon Sep 17 00:00:00 2001 From: Giuseppe Baccini Date: Tue, 19 Jul 2022 09:39:46 +0200 Subject: [PATCH] Fixed misplaced goto in http.c - In http.c:fio_http_queue function, when the user specifies rw=write and if curl_easy_perform fails then the control reaches line 565 and incorrectly prints: "WARNING: Only DDIR_READ/DDIR_WRITE/DDIR_TRIM are supported!". Fix to this consists in moving statement: "goto err" at the end of the block as already has been done for trim/read blocks. Signed-off-by: Giuseppe Baccini --- engines/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/http.c b/engines/http.c index 696febe1..b6df70f8 100644 --- a/engines/http.c +++ b/engines/http.c @@ -526,8 +526,8 @@ static enum fio_q_status fio_http_queue(struct thread_data *td, if (status == 100 || (status >= 200 && status <= 204)) goto out; log_err("DDIR_WRITE failed with HTTP status code %ld\n", status); - goto err; } + goto err; } else if (io_u->ddir == DDIR_READ) { curl_easy_setopt(http->curl, CURLOPT_READDATA, NULL); curl_easy_setopt(http->curl, CURLOPT_WRITEDATA, &_curl_stream); -- 2.25.1