io_ddir: io_ddir_name array should be static
authorJens Axboe <axboe@fb.com>
Fri, 5 Feb 2016 15:42:26 +0000 (08:42 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 5 Feb 2016 15:42:26 +0000 (08:42 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
io_ddir.h

index 071b036..763e826 100644 (file)
--- a/io_ddir.h
+++ b/io_ddir.h
@@ -16,8 +16,9 @@ enum fio_ddir {
 
 static inline const char *io_ddir_name(enum fio_ddir ddir)
 {
-       const char *name[] = { "read", "write", "trim", "sync", "datasync",
-                               "sync_file_range", "wait", };
+       static const char *name[] = { "read", "write", "trim", "sync",
+                                       "datasync", "sync_file_range",
+                                       "wait", };
 
        if (ddir < DDIR_LAST)
                return name[ddir];