From nobody Sun Feb 8 22:50:31 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=1571753075; cv=none; d=zoho.com; s=zohoarc; b=g/UNDtMro1BZv+3IwHMJg//MWGs0aRNOnlC27FQhz++4ApGBHC5UYBXPyTyUoLcTZV8IzEK/757tlhpiJjc0nvPtUnbXHXlZjBoLv0eLMyN4Cmn3vkGN+Uy4BSe3b+B56d+kk3lMucLviJohoBBzzeH8ADTVgNY8WdYNatrdin0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571753075; 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=7RkUsq/32rdZbjQReh1b4jqw0qupeoyrWWvCyYYa9DI=; b=dTbgGofV/efFbAP6wWcxUvXO7/eJGD5hyavYtW8yDFhrv1vS70kxeBd3Hc6JDBk5msjEo3QSGEDsVbZZMV5r8jzZGun0dCGLqJGg2Kq1KY3Su0BRriNktfD2UJ+SLlrNSd1QCAy01XAYOwuIcpo6s9G5T36sRo5x5xBrYJVDY9s= 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 157175307499147.93677491243125; Tue, 22 Oct 2019 07:04:34 -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-329-ZIrIhmetN4-Zx7gJ643aHA-1; Tue, 22 Oct 2019 09:59:32 -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 5C8D71800D79; Tue, 22 Oct 2019 13:59:27 +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 362316012D; Tue, 22 Oct 2019 13:59:27 +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 E91F61803C30; Tue, 22 Oct 2019 13:59:26 +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 x9MDxO6g002037 for ; Tue, 22 Oct 2019 09:59:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id EB82C6012D; Tue, 22 Oct 2019 13:59:24 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7530D6012C for ; Tue, 22 Oct 2019 13:59:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571753073; 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=7RkUsq/32rdZbjQReh1b4jqw0qupeoyrWWvCyYYa9DI=; b=Y9lq9tsc6N2BJIl6eiBE6bt4vNzTO/HD5QmKiOB7tGo0XNFhv6IPS2iwobz23W0uxvey2U CGayvL39tmZcYoecd7QoRWQR+76UqhUZ+G9StDF/S8oBnlv8wNpk0kjui10R4eGjG5LsUm JDmeP/4OW44G5Sq9wI9QVqZn8l6emng= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 22 Oct 2019 15:57:33 +0200 Message-Id: <29805bd3aa865d7877ad9a37eb7fc9766d8b4567.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 29/75] vmx: 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: ZIrIhmetN4-Zx7gJ643aHA-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/vmx/vmx.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 0d1d87bac6..6f47546edf 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -2081,8 +2081,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptio= nPtr xmlopt, virConfPtr con goto cleanup; } =20 - if (virAsprintf(&prefix, "scsi%d:%d", controllerOrBus, unit) <= 0) - goto cleanup; + virAsprintf(&prefix, "scsi%d:%d", controllerOrBus, unit); =20 (*def)->dst =3D virIndexToDiskName @@ -2104,8 +2103,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptio= nPtr xmlopt, virConfPtr con goto cleanup; } =20 - if (virAsprintf(&prefix, "ide%d:%d", controllerOrBus, unit) < = 0) - goto cleanup; + virAsprintf(&prefix, "ide%d:%d", controllerOrBus, unit); =20 (*def)->dst =3D virIndexToDiskName(controllerOrBus * 2 + unit,= "hd"); =20 @@ -2134,8 +2132,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptio= nPtr xmlopt, virConfPtr con goto cleanup; } =20 - if (virAsprintf(&prefix, "floppy%d", unit) < 0) - goto cleanup; + virAsprintf(&prefix, "floppy%d", unit); =20 (*def)->dst =3D virIndexToDiskName(unit, "fd"); =20 @@ -2842,9 +2839,7 @@ virVMXParseSerial(virVMXContext *ctx, virConfPtr conf= , int port, =20 (*def)->source->data.tcp.host =3D g_strdup(parsedUri->server); =20 - if (virAsprintf(&(*def)->source->data.tcp.service, "%d", - parsedUri->port) < 0) - goto cleanup; + virAsprintf(&(*def)->source->data.tcp.service, "%d", parsedUri->po= rt); =20 /* See vSphere API documentation about VirtualSerialPortURIBacking= Info */ if (parsedUri->scheme =3D=3D NULL || --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list