From: Markus Armbruster Date: Wed, 19 Nov 2025 13:08:53 +0000 (+0100) Subject: nbd/client-connection: Replace error_propagate() by assignment X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfd5d4eafbff19779e9aed4a6683cebcac44b0c8;p=thirdparty%2Fqemu.git nbd/client-connection: Replace error_propagate() by assignment connect_thread_func() sets a variable to null, then error_propagate()s an Error * to it. This is a roundabout way to assign the Error * to it, so replace it by just that. Signed-off-by: Markus Armbruster Message-ID: <20251119130855.105479-4-armbru@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Peter Xu Reviewed-by: Zhao Liu --- diff --git a/nbd/client-connection.c b/nbd/client-connection.c index 79ea97e4cc..6a4f080717 100644 --- a/nbd/client-connection.c +++ b/nbd/client-connection.c @@ -207,8 +207,7 @@ static void *connect_thread_func(void *opaque) qemu_mutex_lock(&conn->mutex); error_free(conn->err); - conn->err = NULL; - error_propagate(&conn->err, local_err); + conn->err = local_err; if (ret < 0) { object_unref(OBJECT(conn->sioc));