From: David Bremner Date: Tue, 13 Dec 2011 03:54:24 +0000 (-0400) Subject: command-line-arguments.[ch]: make arrays of keyword descriptors const X-Git-Tag: 0.11_rc1~33 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=f717d2ece1836c863f9cc02abd1ff2539307cd1d command-line-arguments.[ch]: make arrays of keyword descriptors const It seems like it should never be necessary to modify these arrays after initialization. --- diff --git a/command-line-arguments.c b/command-line-arguments.c index 3aa87aa5..e7114143 100644 --- a/command-line-arguments.c +++ b/command-line-arguments.c @@ -13,7 +13,7 @@ static notmuch_bool_t _process_keyword_arg (const notmuch_opt_desc_t *arg_desc, const char *arg_str) { - notmuch_keyword_t *keywords = arg_desc->keywords; + const notmuch_keyword_t *keywords = arg_desc->keywords; while (keywords->name) { if (strcmp (arg_str, keywords->name) == 0) { diff --git a/command-line-arguments.h b/command-line-arguments.h index af8b1ceb..de1734ad 100644 --- a/command-line-arguments.h +++ b/command-line-arguments.h @@ -38,7 +38,7 @@ typedef struct notmuch_opt_desc { void *output_var; const char *name; int arg_id; - struct notmuch_keyword *keywords; + const struct notmuch_keyword *keywords; } notmuch_opt_desc_t;