Make local const string array static
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 8 Aug 2016 17:27:28 +0000 (02:27 +0900)
committerJens Axboe <axboe@fb.com>
Mon, 8 Aug 2016 17:31:12 +0000 (11:31 -0600)
like it is in io_ddir_name().

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
io_ddir.h

index 763e826..2141119 100644 (file)
--- a/io_ddir.h
+++ b/io_ddir.h
@@ -61,7 +61,7 @@ static inline int ddir_rw(enum fio_ddir ddir)
 
 static inline const char *ddir_str(enum td_ddir ddir)
 {
-       const char *__str[] = { NULL, "read", "write", "rw", NULL,
+       static const char *__str[] = { NULL, "read", "write", "rw", NULL,
                                "randread", "randwrite", "randrw",
                                "trim", NULL, NULL, NULL, "randtrim" };