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 763e82659e3ce414827da9919a2339d32967f88c..2141119a2651cb0b73188f0f36b9739960c4458b 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)
 {
 
 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" };
 
                                "randread", "randwrite", "randrw",
                                "trim", NULL, NULL, NULL, "randtrim" };