From nobody Sun Feb 8 17:46:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1571752753; cv=none; d=zoho.com; s=zohoarc; b=ZdiZqWWUKUzKVhs/zHYZ0DGx3HORS9GdzsTwGJdNFWE0imIqq1XdunSAulma4uCskjR8uSYtS6+DiZUr16I+Txr3mBxxqL0Jzb/gbhczVWZQKxfdU7ykZ3kRoZ2k0yFTryEuoU/PbFMDK0eeumUBFjRYY9s3RO14yJGAMBzn9eE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571752753; 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=ICLad+tL/dsA18G2/bVjq4FyyfZmbrcDb6VhznF3mc8=; b=cSa1C+Mdw/y1+qtEL16WccpNzjTUlWPOiUILSD1jS0cnMHKxRFhWANOu/agoSowFDXkNvruH4SMruLHcfNRFiQ/UFS7HkDBZX4Hy0Vwo+Gsky9jOYPkEgSMeil+6ae5cRkKFJiuuCAhOYFHGlFBF11h9EoIRFEvmW+uuDBylejU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1571752753046371.2560733509282; Tue, 22 Oct 2019 06:59:13 -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-29-uuqyDk3kOyqaiCWW29RxmQ-1; Tue, 22 Oct 2019 09:59:09 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A470D800D56; Tue, 22 Oct 2019 13:59:01 +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 740086012D; Tue, 22 Oct 2019 13:59:01 +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 115661806B00; Tue, 22 Oct 2019 13:59:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9MDwiOd001686 for ; Tue, 22 Oct 2019 09:58:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6228160167; Tue, 22 Oct 2019 13:58:44 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id E05E26012C for ; Tue, 22 Oct 2019 13:58:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571752752; 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=ICLad+tL/dsA18G2/bVjq4FyyfZmbrcDb6VhznF3mc8=; b=O/iV+NNIPk3lVY+Swf1JYGq56lUR83YZ0s5llOxRelXzmBF4qeerIqiZcjnrgbkSFYb1Z1 2UqIomFzfpz4mdq6jK5bDB7Fl2v/4DoHU6GudoDP/u4Y4BI5zn0TvnXTV9vxAcO03XAclt 5XuSAobSyW4Jpz5pl1qjeWeN9v2DonU= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 22 Oct 2019 15:57:22 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 18/75] phyp: Drop virAsprintf() and virAsprintfQuiet() retval checking 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.11 X-MC-Unique: uuqyDk3kOyqaiCWW29RxmQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" These functions can't fail really. Drop checking of their retval then. Signed-off-by: Michal Privoznik --- src/phyp/phyp_driver.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 8b1d804233..6aa47ac511 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -504,9 +504,8 @@ phypUUIDTable_Push(virConnectPtr conn) char *remote_file =3D NULL; int ret =3D -1; =20 - if (virAsprintf(&remote_file, "/home/%s/libvirt_uuid_table", - NULLSTR(conn->uri->user)) < 0) - goto cleanup; + virAsprintf(&remote_file, "/home/%s/libvirt_uuid_table", + NULLSTR(conn->uri->user)); =20 if (stat(local_file, &local_fileinfo) =3D=3D -1) { VIR_WARN("Unable to stat local file."); @@ -692,9 +691,8 @@ phypUUIDTable_Pull(virConnectPtr conn) char *remote_file =3D NULL; int ret =3D -1; =20 - if (virAsprintf(&remote_file, "/home/%s/libvirt_uuid_table", - NULLSTR(conn->uri->user)) < 0) - goto cleanup; + virAsprintf(&remote_file, "/home/%s/libvirt_uuid_table", + NULLSTR(conn->uri->user)); =20 /* Trying to stat the remote file. */ do { @@ -939,11 +937,9 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr a= uth, if (userhome =3D=3D NULL) goto err; =20 - if (virAsprintf(&pubkey, "%s/.ssh/id_rsa.pub", userhome) < 0) - goto err; + virAsprintf(&pubkey, "%s/.ssh/id_rsa.pub", userhome); =20 - if (virAsprintf(&pvtkey, "%s/.ssh/id_rsa", userhome) < 0) - goto err; + virAsprintf(&pvtkey, "%s/.ssh/id_rsa", userhome); =20 if (conn->uri->user !=3D NULL) { username =3D g_strdup(conn->uri->user); @@ -2281,8 +2277,7 @@ phypStorageVolGetPath(virStorageVolPtr vol) if (!pv) goto cleanup; =20 - if (virAsprintf(&path, "/%s/%s/%s", pv, ret, vol->name) < 0) - goto cleanup; + virAsprintf(&path, "/%s/%s/%s", pv, ret, vol->name); =20 cleanup: VIR_FREE(ret); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list