diff options
| author | David Bremner <david@tethera.net> | 2021-05-12 20:25:59 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-05-14 06:41:51 -0300 |
| commit | 19983fe554b2b353f10cb818b80e7ef815623b66 (patch) | |
| tree | 051729477f8b0ba215ea1fdd7295df5eb06f2f6e /notmuch-config.c | |
| parent | 5a8d174f6797844580b52857a6254c25ce532d1c (diff) | |
CLI/config: make immutable tables const
Let the compiler help us catch bugs.
Diffstat (limited to 'notmuch-config.c')
| -rw-r--r-- | notmuch-config.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/notmuch-config.c b/notmuch-config.c index d9390c4d..3430a3d3 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -32,7 +32,7 @@ static const char toplevel_config_comment[] = "\n" " For more information about notmuch, see https://notmuchmail.org"; -struct config_group { +static const struct config_group { const char *group_name; const char *comment; } group_comment_table [] = { @@ -512,14 +512,14 @@ typedef struct config_key { bool (*validate)(const char *); } config_key_info_t; -static struct config_key +static const struct config_key config_key_table[] = { { "index.decrypt", false, NULL }, { "index.header.", true, validate_field_name }, { "query.", true, NULL }, }; -static config_key_info_t * +static const config_key_info_t * _config_key_info (const char *item) { for (size_t i = 0; i < ARRAY_SIZE (config_key_table); i++) { @@ -583,7 +583,7 @@ notmuch_config_command_set (notmuch_database_t *notmuch, int argc, char *argv[]) { char *group, *key; - config_key_info_t *key_info; + const config_key_info_t *key_info; notmuch_conffile_t *config; bool update_database = false; int opt_index, ret; |
