[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6] nbd: well form nbd_iter_channel_error errp handler
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v6] nbd: well form nbd_iter_channel_error errp handler |
Date: |
Wed, 27 Nov 2019 22:08:40 +0300 |
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 <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
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
- [PATCH v6] nbd: well form nbd_iter_channel_error errp handler,
Vladimir Sementsov-Ogievskiy <=