From: Jens Axboe Date: Thu, 16 Aug 2018 15:30:21 +0000 (-0600) Subject: engines/http: fix use of uninitialized variable X-Git-Tag: fio-3.9~30 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=c65f3435e9de832be7e08acd0b8d40220505f2d7 engines/http: fix use of uninitialized variable Fixes: c2f6a13ddc64 ("engines/http: Add support for WebDAV and S3") Signed-off-by: Jens Axboe --- diff --git a/engines/http.c b/engines/http.c index 979573a8..9d08bb4b 100644 --- a/engines/http.c +++ b/engines/http.c @@ -498,7 +498,7 @@ static int fio_http_setup(struct thread_data *td) { struct http_data *http = NULL; struct http_options *o = td->eo; - int r; + /* allocate engine specific structure to deal with libhttp. */ http = calloc(1, sizeof(*http)); if (!http) { @@ -531,7 +531,7 @@ static int fio_http_setup(struct thread_data *td) return 0; cleanup: fio_http_cleanup(td); - return r; + return 1; } static int fio_http_open(struct thread_data *td, struct fio_file *f)