X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Fconf-parser.h;h=6152ee33b93af8bb28113c84bef6850c8e32e24b;hp=2507a44444a5e620f32554a90a2c2c4ffe4aa75f;hb=d44c666228d4872101eae5e55f44b1985476e7f2;hpb=086891e5c119abb9854237fc32e736fe2d67234c diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h index 2507a4444..6152ee33b 100644 --- a/src/shared/conf-parser.h +++ b/src/shared/conf-parser.h @@ -119,28 +119,12 @@ int config_parse_mode(const char *unit, const char *filename, unsigned line, con int config_parse_log_facility(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); int config_parse_log_level(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); -int log_syntax_internal( - const char *unit, - int level, - const char *file, - int line, - const char *func, - const char *config_file, - unsigned config_line, - int error, - const char *format, ...) _printf_(9, 10); - -#define log_syntax(unit, level, config_file, config_line, error, ...) \ - log_syntax_internal(unit, level, \ - __FILE__, __LINE__, __func__, \ - config_file, config_line, \ - error, __VA_ARGS__) - -#define log_invalid_utf8(unit, level, config_file, config_line, error, rvalue) { \ - _cleanup_free_ char *__p = utf8_escape_invalid(rvalue); \ - log_syntax(unit, level, config_file, config_line, error, \ - "String is not UTF-8 clean, ignoring assignment: %s", __p); \ - } +#define log_invalid_utf8(unit, level, config_file, config_line, error, rvalue) \ + do { \ + _cleanup_free_ char *_p = utf8_escape_invalid(rvalue); \ + log_syntax(unit, level, config_file, config_line, error, \ + "String is not UTF-8 clean, ignoring assignment: %s", strna(_p)); \ + } while(false) #define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg) \ int function(const char *unit, \