From nobody Mon Feb 9 19:53:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622812283; cv=none; d=zohomail.com; s=zohoarc; b=MOoDonT5T+OOv2gSXqFn3qHXSb572mp4zYVeSGcPdszMXOE80kvMFBIdNzbrnHt++meF/dKInqiTnSln/jBn7eaplqX+SNqZyqcrfM65JPpA2+jr3+8gvceBeFJgdFOivJaCUDbEaeqeyRKG5lxTnzcUxIR0GYbAwn5qYe5/U5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622812283; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LgYueKHMsxCxGwDFBK8+jiN+9OIQBF1nfsKqlTeFARk=; b=lHJNqQaYYGxdteNhW2BBVIThGrzb8UdTgktnJNBbd3oN50rwX5qH9XI0nzW101sYudTl+2mSTe9H1PC5K0ipevsIJP+1rZYetYnxwIMQVzSZofYG01lWTmW5ODTNs8zckSkJaNQviLltgVJ18NHsfCxSeiH154xTI3QJneo05Do= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1622812283837151.64910605829255; Fri, 4 Jun 2021 06:11:23 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-331-geIjn3CMM_ikO2I9j_bUvw-1; Fri, 04 Jun 2021 09:11:19 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3DB77801817; Fri, 4 Jun 2021 13:11:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A0EE60622; Fri, 4 Jun 2021 13:11:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 878761800BB8; Fri, 4 Jun 2021 13:11:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 154DAt4f026569 for ; Fri, 4 Jun 2021 09:10:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 770695C26D; Fri, 4 Jun 2021 13:10:55 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id EFB895C1C5 for ; Fri, 4 Jun 2021 13:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622812282; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LgYueKHMsxCxGwDFBK8+jiN+9OIQBF1nfsKqlTeFARk=; b=O7QCsvyJ3ul4BZzFMhe6tbmksJnF1XHHKCVEI5QwvkVXX2uXSVFRcmO7mYzkYw95l911O1 WlpUqo9tYXDyIoSY+bqCs3mmbLBmmRjQlYIHm8vapiAiZVBc6a8vzf3BPiGJf4ds1iarj7 3852LuNgjm0VDZE/0oG+sYWEHkTgekY= X-MC-Unique: geIjn3CMM_ikO2I9j_bUvw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 6/6] chExtractVersion: Drop @ret Date: Fri, 4 Jun 2021 15:10:45 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" After previous patches, the @ret variable and the 'cleanup' label are redundant. Remove them. Signed-off-by: Michal Privoznik --- src/ch/ch_conf.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/ch/ch_conf.c b/src/ch/ch_conf.c index c67c815d45..5f156dfe44 100644 --- a/src/ch/ch_conf.c +++ b/src/ch/ch_conf.c @@ -194,7 +194,6 @@ virCHDriverConfigDispose(void *obj) int chExtractVersion(virCHDriver *driver) { - int ret =3D -1; unsigned long version; g_autofree char *help =3D NULL; char *tmp =3D NULL; @@ -209,7 +208,7 @@ chExtractVersion(virCHDriver *driver) virCommandSetOutputBuffer(cmd, &help); =20 if (virCommandRun(cmd, NULL) < 0) - goto cleanup; + return -1; =20 tmp =3D help; =20 @@ -217,24 +216,21 @@ chExtractVersion(virCHDriver *driver) if ((tmp =3D STRSKIP(tmp, "cloud-hypervisor v")) =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unexpected output of cloud-hypervisor binary")); - goto cleanup; + return -1; } =20 if (virParseVersionString(tmp, &version, true) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unable to parse cloud-hypervisor version: %s"), = tmp); - goto cleanup; + return -1; } =20 if (version < MIN_VERSION) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Cloud-Hypervisor version is too old (v15.0 is th= e minimum supported version)")); - goto cleanup; + return -1; } =20 driver->version =3D version; - ret =3D 0; - - cleanup: - return ret; + return 0; } --=20 2.31.1