From 7a2cf03579fc97563a338be183297da1dca4b9f8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Sep 2008 10:39:01 +0200 Subject: [PATCH] options: constant options_table Make the options_table constant, since it is never modified. --- src/options.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/options.c b/src/options.c index e92cebb..2c81827 100644 --- a/src/options.c +++ b/src/options.c @@ -46,7 +46,7 @@ typedef void (*option_callback_fn_t)(int c, const char *arg); options_t options; -static arg_opt_t option_table[] = { +static const arg_opt_t option_table[] = { { '?', "help", NULL, "Show this help message" }, { 'V', "version", NULL, "Display version information" }, { 'c', "colors", NULL, "Enable colors" }, @@ -69,7 +69,7 @@ static arg_opt_t option_table[] = { { 0, NULL, NULL, NULL }, }; -static arg_opt_t * +static const arg_opt_t * lookup_option(int s, char *l) { int i; @@ -226,7 +226,7 @@ options_t * options_parse(int argc, const char *argv[]) { int i; - arg_opt_t *opt = NULL; + const arg_opt_t *opt = NULL; option_callback_fn_t option_cb = handle_option; i=1; -- 2.30.2