diff options
author | Tobias Brunner <tobias@strongswan.org> | 2014-05-14 17:19:41 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2014-05-15 11:28:10 +0200 |
commit | c976cc7d33d6c3aeeb6e2a8a82c10401f629f93c (patch) | |
tree | a44c96aa3215533cf3ceb24000c2c46a53b7b179 /src/libstrongswan/utils/parser_helper.h | |
parent | 4b670a20a9ee0ac5efd806ff804e75fe00509826 (diff) | |
download | strongswan-c976cc7d33d6c3aeeb6e2a8a82c10401f629f93c.tar.bz2 strongswan-c976cc7d33d6c3aeeb6e2a8a82c10401f629f93c.tar.xz |
parser-helper: Make parser_helper_log a function
Diffstat (limited to 'src/libstrongswan/utils/parser_helper.h')
-rw-r--r-- | src/libstrongswan/utils/parser_helper.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/libstrongswan/utils/parser_helper.h b/src/libstrongswan/utils/parser_helper.h index 741582d2c..6a2c26c8e 100644 --- a/src/libstrongswan/utils/parser_helper.h +++ b/src/libstrongswan/utils/parser_helper.h @@ -148,15 +148,7 @@ struct parser_helper_file_t { * @param fmt error message format * @param ... additional arguments */ -#define parser_helper_log(level, ctx, fmt, ...) ({ \ - parser_helper_file_t *_file = (ctx)->file_current(ctx); \ - int _line = (ctx)->get_lineno ? (ctx)->get_lineno((ctx)->scanner) : 0; \ - if (_file) {\ - DBG##level(DBG_CFG, "%s:%d: " fmt, _file->name, _line, ##__VA_ARGS__); \ - } else { \ - DBG##level(DBG_CFG, fmt, ##__VA_ARGS__); \ - } \ -}) +void parser_helper_log(int level, parser_helper_t *ctx, char *fmt, ...); #define PARSER_DBG1(ctx, fmt, ...) parser_helper_log(1, ctx, fmt, ##__VA_ARGS__) #define PARSER_DBG2(ctx, fmt, ...) parser_helper_log(2, ctx, fmt, ##__VA_ARGS__) |