[tarantool-patches] [PATCH v1 1/1] say: fix invalid arguments
Kirill Shcherbatov
kshcherbatov at tarantool.org
Wed Jul 18 17:26:22 MSK 2018
_say function was called with invalid arguments.
Thank @sorc1 for patch.
Closes #3433.
---
Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-3433-c-say-fix
Issue: https://github.com/tarantool/tarantool/issues/3433
src/say.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/say.h b/src/say.h
index f324c27..708637c 100644
--- a/src/say.h
+++ b/src/say.h
@@ -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.
--
2.7.4
More information about the Tarantool-patches
mailing list