From: Max Kellermann Date: Mon, 22 Sep 2008 08:39:01 +0000 (+0200) Subject: options: constant options_table X-Git-Tag: v0.12_alpha1~182 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7a2cf03579fc97563a338be183297da1dca4b9f8;p=ncmpc.git options: constant options_table Make the options_table constant, since it is never modified. --- 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;