diff options
Diffstat (limited to 'src/shared/conf-parser.c')
-rw-r--r-- | src/shared/conf-parser.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 5002e42dd..eeb93e284 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -40,6 +40,7 @@ //#include "rlimit-util.h" //#include "rlimit-util.h" //#include "rlimit-util.h" +//#include "rlimit-util.h" int config_item_table_lookup( const void *table, @@ -510,34 +511,7 @@ int config_parse_many( #endif // 0 #define DEFINE_PARSER(type, vartype, conv_func) \ - int config_parse_##type( \ - const char *unit, \ - const char *filename, \ - unsigned line, \ - const char *section, \ - unsigned section_line, \ - const char *lvalue, \ - int ltype, \ - const char *rvalue, \ - void *data, \ - void *userdata) { \ - \ - vartype *i = data; \ - int r; \ - \ - assert(filename); \ - assert(lvalue); \ - assert(rvalue); \ - assert(data); \ - \ - r = conv_func(rvalue, i); \ - if (r < 0) \ - log_syntax(unit, LOG_ERR, filename, line, r, \ - "Failed to parse %s value, ignoring: %s", \ - #type, rvalue); \ - \ - return 0; \ - } + DEFINE_CONFIG_PARSE_PTR(config_parse_##type, conv_func, vartype, "Failed to parse " #type " value") DEFINE_PARSER(int, int, safe_atoi); DEFINE_PARSER(long, long, safe_atoli); |