engines/http: fix use of uninitialized variable
authorJens Axboe <axboe@kernel.dk>
Thu, 16 Aug 2018 15:30:21 +0000 (09:30 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 16 Aug 2018 15:30:21 +0000 (09:30 -0600)
Fixes: c2f6a13ddc64 ("engines/http: Add support for WebDAV and S3")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/http.c

index 979573a858bea8551d9053997574e55e1d9e055a..9d08bb4bc59643ba735493bd7f63982b3be40a93 100644 (file)
@@ -498,7 +498,7 @@ static int fio_http_setup(struct thread_data *td)
 {
        struct http_data *http = NULL;
        struct http_options *o = td->eo;
 {
        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) {
        /* 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 0;
 cleanup:
        fio_http_cleanup(td);
-       return r;
+       return 1;
 }
 
 static int fio_http_open(struct thread_data *td, struct fio_file *f)
 }
 
 static int fio_http_open(struct thread_data *td, struct fio_file *f)