From nobody Sun Feb 8 20:35:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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=1571752758; cv=none; d=zoho.com; s=zohoarc; b=nuCPxlLt+Qr0+i2/vTZsar7ojbWFXEttfrW0EmoqdVUbwm1h5f//R4w4prTceJMHzkRt4FooN700yTGe+y4Z2G2dLfV48f8t6pQgz8j2bPZ7qZZT08obKQKgWbnGZPJZr1k1NthDBRnmQ1sDbu6VYNfEVg7v/HSWVsTKZ8EJEnE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571752758; 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=ZVU8XSXaLBvAamtAkJfiD55ADAhMYYrWM+uJHYDUujQ=; b=KdP68xjQxkcRAEosXHwVmYGJ5oJA4ROtLhmdiW0/h4ZqkQqW9x+rYfv4QOU8n9ZKxu4LSMInhb67iVGdruh7Ttq7B+pYRhQ3XP3djBY5pRbzqOvy3OJ9mLQ+kfG+tpuYsA/r/QDvwLlf58LUuA93ez69Pb3s82Wvs7fHx694cEI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 157175275876122.72375123128245; Tue, 22 Oct 2019 06:59:18 -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-257-3mG6zHsZMRei4VdZDWuxhQ-1; Tue, 22 Oct 2019 09:59:15 -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 274DF107AD34; Tue, 22 Oct 2019 13:59:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ECC1760167; Tue, 22 Oct 2019 13:59:09 +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 A6CEF3FB4F; Tue, 22 Oct 2019 13:59:09 +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 x9MDx8qw001847 for ; Tue, 22 Oct 2019 09:59:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 778F56012E; Tue, 22 Oct 2019 13:59:08 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 00F5D60467 for ; Tue, 22 Oct 2019 13:59:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571752757; 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=ZVU8XSXaLBvAamtAkJfiD55ADAhMYYrWM+uJHYDUujQ=; b=EiYHAOUer882KhqIXzY1Vztx+4iUvN959l8aEvVELm9pTgljYXMGp3PHFo3TgtL5EkuA5l 4QTbWagftOEhZTgFYgvB2AWCy12NZWeImx/zWb1+j9Lar6/E6Hwz/NpGsU9n1UaKAt6x+F T+U9CNKD0FPSf1l7T8scGRCkWGCKFrg= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 22 Oct 2019 15:57:30 +0200 Message-Id: <84678527b7e0aebcbc9b9bb2dd37f37583b0ab0a.1571752582.git.mprivozn@redhat.com> 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 26/75] secret: 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: 3mG6zHsZMRei4VdZDWuxhQ-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/secret/secret_driver.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index 6d2844f3b7..064a02dfdd 100644 --- a/src/secret/secret_driver.c +++ b/src/secret/secret_driver.c @@ -469,25 +469,19 @@ secretStateInitialize(bool privileged, driver->privileged =3D privileged; =20 if (privileged) { - if (virAsprintf(&driver->configDir, - "%s/libvirt/secrets", SYSCONFDIR) < 0) - goto error; - if (virAsprintf(&driver->stateDir, - "%s/libvirt/secrets", RUNSTATEDIR) < 0) - goto error; + virAsprintf(&driver->configDir, "%s/libvirt/secrets", SYSCONFDIR); + virAsprintf(&driver->stateDir, "%s/libvirt/secrets", RUNSTATEDIR); } else { g_autofree char *rundir =3D NULL; g_autofree char *cfgdir =3D NULL; =20 if (!(cfgdir =3D virGetUserConfigDirectory())) goto error; - if (virAsprintf(&driver->configDir, "%s/secrets/", cfgdir) < 0) - goto error; + virAsprintf(&driver->configDir, "%s/secrets/", cfgdir); =20 if (!(rundir =3D virGetUserRuntimeDirectory())) goto error; - if (virAsprintf(&driver->stateDir, "%s/secrets/run", rundir) < 0) - goto error; + virAsprintf(&driver->stateDir, "%s/secrets/run", rundir); } =20 if (virFileMakePathWithMode(driver->configDir, S_IRWXU) < 0) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list