diff options
author | Max Kellermann <max@duempel.org> | 2008-09-22 10:39:01 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-22 10:39:01 +0200 |
commit | 7a2cf03579fc97563a338be183297da1dca4b9f8 (patch) | |
tree | 5fe617dc994b63056f45b715cf07f4d4ae9e9ecf | |
parent | 564ec056a44fa248ba2c3b2edc7f9be980bb20ad (diff) | |
download | mpd-7a2cf03579fc97563a338be183297da1dca4b9f8.tar.gz mpd-7a2cf03579fc97563a338be183297da1dca4b9f8.tar.xz mpd-7a2cf03579fc97563a338be183297da1dca4b9f8.zip |
options: constant options_table
Make the options_table constant, since it is never modified.
-rw-r--r-- | src/options.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/options.c b/src/options.c index e92cebbd0..2c8182795 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; |