From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, vsementsov@virtuozzo.com,
qemu-devel@nongnu.org, mreitz@redhat.com
Subject: [PATCH v6] nbd: well form nbd_iter_channel_error errp handler
Date: Wed, 27 Nov 2019 22:08:40 +0300 [thread overview]
Message-ID: <20191127190840.15773-1-vsementsov@virtuozzo.com> (raw)
Make nbd_iter_channel_error errp handler well formed:
rename local_err to errp_in, as it is IN-parameter here (which is
unusual for Error**).
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
v6: fix commit message
add Eric's r-b
block/nbd.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/block/nbd.c b/block/nbd.c
index 5f18f78a94..345bf902e3 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -864,18 +864,18 @@ typedef struct NBDReplyChunkIter {
} NBDReplyChunkIter;
static void nbd_iter_channel_error(NBDReplyChunkIter *iter,
- int ret, Error **local_err)
+ int ret, Error **errp_in)
{
- assert(ret < 0);
+ assert(ret < 0 && errp_in && *errp_in);
if (!iter->ret) {
iter->ret = ret;
- error_propagate(&iter->err, *local_err);
+ error_propagate(&iter->err, *errp_in);
} else {
- error_free(*local_err);
+ error_free(*errp_in);
}
- *local_err = NULL;
+ *errp_in = NULL;
}
static void nbd_iter_request_error(NBDReplyChunkIter *iter, int ret)
--
2.21.0
next reply other threads:[~2019-11-27 19:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 19:08 Vladimir Sementsov-Ogievskiy [this message]
2019-11-27 19:49 ` [PATCH v6] nbd: well form nbd_iter_channel_error errp handler Eric Blake
2019-11-27 20:07 ` Vladimir Sementsov-Ogievskiy
2019-11-29 13:25 ` Markus Armbruster
2019-11-29 14:17 ` Vladimir Sementsov-Ogievskiy
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=20191127190840.15773-1-vsementsov@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).