diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/conf-parser.c | 12 | ||||
-rw-r--r-- | src/shared/conf-parser.h | 8 | ||||
-rw-r--r-- | src/shared/install.c | 2 | ||||
-rw-r--r-- | src/shared/sleep-config.c | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 158e9efd4c..1f40986649 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -76,7 +76,7 @@ int log_syntax_internal(const char *unit, int level, } int config_item_table_lookup( - void *table, + const void *table, const char *section, const char *lvalue, ConfigParserCallback *func, @@ -84,7 +84,7 @@ int config_item_table_lookup( void **data, void *userdata) { - ConfigTableItem *t; + const ConfigTableItem *t; assert(table); assert(lvalue); @@ -110,7 +110,7 @@ int config_item_table_lookup( } int config_item_perf_lookup( - void *table, + const void *table, const char *section, const char *lvalue, ConfigParserCallback *func, @@ -154,7 +154,7 @@ static int next_assignment(const char *unit, const char *filename, unsigned line, ConfigItemLookup lookup, - void *table, + const void *table, const char *section, unsigned section_line, const char *lvalue, @@ -199,7 +199,7 @@ static int parse_line(const char* unit, unsigned line, const char *sections, ConfigItemLookup lookup, - void *table, + const void *table, bool relaxed, bool allow_include, char **section, @@ -323,7 +323,7 @@ int config_parse(const char *unit, FILE *f, const char *sections, ConfigItemLookup lookup, - void *table, + const void *table, bool relaxed, bool allow_include, void *userdata) { diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h index 9d166de9c7..3e2c784805 100644 --- a/src/shared/conf-parser.h +++ b/src/shared/conf-parser.h @@ -65,7 +65,7 @@ typedef const ConfigPerfItem* (*ConfigPerfItemLookup)(const char *section_and_lv /* Prototype for a generic high-level lookup function */ typedef int (*ConfigItemLookup)( - void *table, + const void *table, const char *section, const char *lvalue, ConfigParserCallback *func, @@ -75,18 +75,18 @@ typedef int (*ConfigItemLookup)( /* Linear table search implementation of ConfigItemLookup, based on * ConfigTableItem arrays */ -int config_item_table_lookup(void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata); +int config_item_table_lookup(const void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata); /* gperf implementation of ConfigItemLookup, based on gperf * ConfigPerfItem tables */ -int config_item_perf_lookup(void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata); +int config_item_perf_lookup(const void *table, const char *section, const char *lvalue, ConfigParserCallback *func, int *ltype, void **data, void *userdata); int config_parse(const char *unit, const char *filename, FILE *f, const char *sections, /* nulstr */ ConfigItemLookup lookup, - void *table, + const void *table, bool relaxed, bool allow_include, void *userdata); diff --git a/src/shared/install.c b/src/shared/install.c index 190c554347..a080d8f328 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1076,7 +1076,7 @@ static int unit_file_load( return -ENOMEM; } - r = config_parse(NULL, path, f, NULL, config_item_table_lookup, (void*) items, true, true, info); + r = config_parse(NULL, path, f, NULL, config_item_table_lookup, items, true, true, info); if (r < 0) return r; diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c index 867e4edaa2..4b2b0fe100 100644 --- a/src/shared/sleep-config.c +++ b/src/shared/sleep-config.c @@ -57,7 +57,7 @@ int parse_sleep_config(const char *verb, char ***_modes, char ***_states) { "Failed to open configuration file " PKGSYSCONFDIR "/sleep.conf: %m"); else { r = config_parse(NULL, PKGSYSCONFDIR "/sleep.conf", f, "Sleep\0", - config_item_table_lookup, (void*) items, false, false, NULL); + config_item_table_lookup, items, false, false, NULL); if (r < 0) log_warning("Failed to parse configuration file: %s", strerror(-r)); } |