From: Cyrill Gorcunov <gorcunov@gmail.com> To: tml <tarantool-patches@dev.tarantool.org> Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: [Tarantool-patches] [PATCH] cfg: fix format in error message Date: Sun, 27 Dec 2020 00:38:09 +0300 [thread overview] Message-ID: <20201226213809.511284-1-gorcunov@gmail.com> (raw) Coverity pointed that quorum value is int64_t wide and could be trimmed in error message. Fix it using proper formatting. CID 1500388 Part-of #5446 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- branch gorcunov/gh-5446-fixup for 2.6 and 2.5 src/box/box.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/box/box.cc b/src/box/box.cc index e1d8305c8..3c5873e3c 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -623,10 +623,10 @@ box_eval_replication_synchro_quorum(int nr_replicas) if (quorum <= 0 || quorum >= VCLOCK_MAX) { const char *msg = tt_sprintf("the formula is evaluated " - "to the quorum %d for replica " + "to the quorum %lld for replica " "number %d, which is out of range " - "[%d;%d]", - quorum, nr_replicas, 1, VCLOCK_MAX - 1); + "[%d;%d]", (long long)quorum, + nr_replicas, 1, VCLOCK_MAX - 1); diag_set(ClientError, ER_CFG, "replication_synchro_quorum", msg); return -1; -- 2.26.2
next reply other threads:[~2020-12-26 21:38 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-26 21:38 Cyrill Gorcunov [this message] 2020-12-26 22:00 ` Cyrill Gorcunov 2020-12-28 7:47 ` Alexander V. Tikhonov 2020-12-28 7:53 ` Cyrill Gorcunov 2020-12-28 11:03 ` 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=20201226213809.511284-1-gorcunov@gmail.com \ --to=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] cfg: fix format in error message' \ /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