From: imeevma@tarantool.org
To: tarantool-patches@freelists.org, vdavydov.dev@gmail.com
Subject: [PATCH 1/1] box: add error description
Date: Wed, 9 Jan 2019 19:57:05 +0300 [thread overview]
Message-ID: <aa2f64838fa5132d85f5e4d216af34a6c11512bd.1547052781.git.imeevma@gmail.com> (raw)
This patch adds a description to the error that occurs when
obuf_alloc() fails in box/port.c.
---
https://github.com/tarantool/tarantool/tree/imeevma/add-error-description
src/box/port.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/box/port.c b/src/box/port.c
index ef511ea..9904644 100644
--- a/src/box/port.c
+++ b/src/box/port.c
@@ -113,8 +113,11 @@ port_tuple_dump_msgpack(struct port *base, struct obuf *out)
{
struct port_tuple *port = port_tuple(base);
char *size_buf = obuf_alloc(out, mp_sizeof_array(port->size));
- if (size_buf == NULL)
+ if (size_buf == NULL) {
+ diag_set(OutOfMemory, mp_sizeof_array(port->size), "obuf_alloc",
+ "size_buf");
return -1;
+ }
mp_encode_array(size_buf, port->size);
if (port_tuple_dump_msgpack_16(base, out) < 0)
return -1;
--
2.7.4
next reply other threads:[~2019-01-09 16:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 16:57 imeevma [this message]
2019-01-10 15:41 ` Vladimir Davydov
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=aa2f64838fa5132d85f5e4d216af34a6c11512bd.1547052781.git.imeevma@gmail.com \
--to=imeevma@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [PATCH 1/1] box: add error description' \
/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