t/io_uring: terminate buf[] file depth string
authorJens Axboe <axboe@kernel.dk>
Tue, 15 Jan 2019 20:52:14 +0000 (13:52 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 15 Jan 2019 20:52:14 +0000 (13:52 -0700)
Prevents garbage print for !s->nr_files (do_nop = 1).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/io_uring.c

index 78b9268..dd510be 100644 (file)
@@ -475,6 +475,7 @@ static void file_depths(char *buf)
        char *p;
        int i;
 
+       buf[0] = '\0';
        p = buf;
        for (i = 0; i < s->nr_files; i++) {
                struct file *f = &s->files[i];