From: Kirill Shcherbatov <kshcherbatov@tarantool.org> To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Kirill Shcherbatov <kshcherbatov@tarantool.org> Subject: [tarantool-patches] [PATCH v1 1/1] say: fix invalid arguments Date: Wed, 18 Jul 2018 17:26:22 +0300 [thread overview] Message-ID: <8d5df1d2ee0c00af6d40673cd9aca30f3d4d6690.1531923866.git.kshcherbatov@tarantool.org> (raw) _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
next reply other threads:[~2018-07-18 14:26 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-07-18 14:26 Kirill Shcherbatov [this message] 2018-07-19 11:33 ` [tarantool-patches] " Vladislav Shpilevoy 2018-07-19 15:16 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=8d5df1d2ee0c00af6d40673cd9aca30f3d4d6690.1531923866.git.kshcherbatov@tarantool.org \ --to=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [tarantool-patches] [PATCH v1 1/1] say: fix invalid arguments' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox