summaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-03-09 16:46:02 -0800
committerJens Axboe <axboe@kernel.dk>2018-03-09 21:33:32 -0700
commit447931d99aff4dad5fabfafc3b96341d8143d90c (patch)
treedba8686fe1b1dc918d9f0f015b0832a9bcaa93b0 /init.c
parent408874dae09d781eeff74775008ac79b641f412e (diff)
Declare debug_levels[] const
Since debug_levels[] is not modified by any code, declare it const. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'init.c')
-rw-r--r--init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/init.c b/init.c
index 28061db..bb0627b 100644
--- a/init.c
+++ b/init.c
@@ -2094,7 +2094,7 @@ static int fill_def_thread(void)
static void show_debug_categories(void)
{
#ifdef FIO_INC_DEBUG
- struct debug_level *dl = &debug_levels[0];
+ const struct debug_level *dl = &debug_levels[0];
int curlen, first = 1;
curlen = 0;
@@ -2184,7 +2184,7 @@ static void usage(const char *name)
}
#ifdef FIO_INC_DEBUG
-struct debug_level debug_levels[] = {
+const struct debug_level debug_levels[] = {
{ .name = "process",
.help = "Process creation/exit logging",
.shift = FD_PROCESS,
@@ -2262,7 +2262,7 @@ struct debug_level debug_levels[] = {
static int set_debug(const char *string)
{
- struct debug_level *dl;
+ const struct debug_level *dl;
char *p = (char *) string;
char *opt;
int i;