X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fconf-parser.c;h=1f40986649bad25722694cebd49984469df1c840;hb=eda8090ba9abc7d00f30e2b4cb34273cde799704;hp=77a172e9f1dffbdbd5ccf7a8802a49a3e2930c9d;hpb=9f43a07f10639c5b41b45448e551e43914eefe32;p=elogind.git diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 77a172e9f..1f4098664 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) { @@ -688,7 +688,7 @@ int config_parse_strv(const char *unit, FOREACH_WORD_QUOTED(w, l, rvalue, state) { char *n; - n = cunescape_length(w, l); + n = strndup(w, l); if (!n) return log_oom();