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 78b92685316cb7bc751cd3b49295be388f8a5807..dd510be5611a6365992fe228cb69932ae8e53844 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];