Skip to content
Snippets Groups Projects
Commit 1046f851 authored by Kirill Shcherbatov's avatar Kirill Shcherbatov Committed by Kirill Yukhin
Browse files

say: fix invalid arguments

_say function was called with invalid arguments.
Thank @sorc1 for patch.

Closes #3433.
parent c422b267
No related branches found
No related tags found
No related merge requests found
......@@ -261,26 +261,28 @@ CFORMAT(printf, 5, 0) extern sayfunc_t _say;
* \param level (int) - log level (see enum \link say_level \endlink)
* \param file (const char * ) - file name to print
* \param line (int) - line number to print
* \param error (const char * ) - error description, may be NULL
* \param format (const char * ) - printf()-like format string
* \param ... - format arguments
* \sa printf()
* \sa enum say_level
*/
#define say_file_line(level, file, line, format, ...) ({ \
#define say_file_line(level, file, line, error, format, ...) ({ \
if (say_log_level_is_enabled(level)) \
_say(level, file, line, format, ##__VA_ARGS__); })
_say(level, file, line, error, format, ##__VA_ARGS__); })
/**
* Format and print a message to Tarantool log file.
*
* \param level (int) - log level (see enum \link say_level \endlink)
* \param error (const char * ) - error description, may be NULL
* \param format (const char * ) - printf()-like format string
* \param ... - format arguments
* \sa printf()
* \sa enum say_level
*/
#define say(level, format, ...) ({ \
say_file_line(level, __FILE__, __LINE__, format, ##__VA_ARGS__); })
#define say(level, error, format, ...) ({ \
say_file_line(level, __FILE__, __LINE__, error, format, ##__VA_ARGS__); })
/**
* Format and print a message to Tarantool log file.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment