Make nbd_iter_channel_error errp handler well formed: rename errp to errp_in, as it is IN-parameter here (which is unusual for errp).
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> --- block/nbd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 813c40d8f0..c66fdf54b9 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -684,18 +684,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