From nobody Mon Nov 25 16:33:04 2024 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=1600868107; cv=none; d=zohomail.com; s=zohoarc; b=AAfN3UN6p+B0Xr10WPEfmdsn+yabnoL4UC3Wfbc0fBj5SSPJJiAnXt+nMN7rzm5DKGpCWVlLEli+uRBCunhYHkvJxUdt7M+lri3s7O/DeHrwo5QD8NolI0xy1YrO0eNHZcyrLDm+SwttHxUw9UPRP0hqy3UFHVr0Zseb3/8kAGw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600868107; 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=7ct5xk3PU6v1ZelXr+PLL+ZYfbVF1BJClQ8UWWah2Hc=; b=mDYeC7V1wZuIkjNrIAYS2x8gIQzvnlozcRsHKDtMJBDBncu/wEr3n4KTu0gij67qtHkyUIdgQZD6qZqR1W4aqbMhrHvKY67KgZh8o5q3aEYLn7RoqXyM/Rn1ptyioXrJAtZbCAO6c6HwFJXF/YG/rOw4qFa8NwyIrODaIMLxXaE= 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 1600868107036964.6040824296944; Wed, 23 Sep 2020 06:35:07 -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-255-h2CdEPb_P4yDxjdSa8Xakw-1; Wed, 23 Sep 2020 09:34:18 -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 13F7910BBECE; Wed, 23 Sep 2020 13:34:12 +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 E75E378823; Wed, 23 Sep 2020 13:34:11 +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 B33318C7DB; Wed, 23 Sep 2020 13:34:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08NDY03N013948 for ; Wed, 23 Sep 2020 09:34:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id D0AD410021AA; Wed, 23 Sep 2020 13:34:00 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35024100238E for ; Wed, 23 Sep 2020 13:33:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600868105; 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=7ct5xk3PU6v1ZelXr+PLL+ZYfbVF1BJClQ8UWWah2Hc=; b=goD0F2gMedTtJHMcqBMc2A8QkyX+J2aQAqykY72fFKoo5qcNPTxqadZ7qveX+uNrwV9/Hl VExMKoLognkNMdA0P6N1mvcn9wSqYw1/DlbW1Y4e6ou84u0w1du/MRqwt8MDwzpZQhDH32 bQdfueIQlx2FJkK6Am/NuMsgwAvqzzM= X-MC-Unique: h2CdEPb_P4yDxjdSa8Xakw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/13] virDomainSnapshotAlignDisks: remove unnecessary 'tmp' variable Date: Wed, 23 Sep 2020 15:33:41 +0200 Message-Id: <924a719038330e12f8172f7376c13dcc65184dea.1600867955.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.11 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" The converted string is used exactly once so we can call the conversion without storing the result in a variable. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/snapshot_conf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index aeebe2fb33..10eb584a1c 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -709,12 +709,10 @@ virDomainSnapshotAlignDisks(virDomainSnapshotDefPtr s= napdef, snapdisk->snapshot !=3D default_snapshot && !(snapdisk->snapshot =3D=3D VIR_DOMAIN_SNAPSHOT_LOCATIO= N_NONE && disk_snapshot =3D=3D VIR_DOMAIN_SNAPSHOT_LOCATION_NON= E)) { - const char *tmp; - - tmp =3D virDomainSnapshotLocationTypeToString(default_snapshot= ); virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("disk '%s' must use snapshot mode '%s'"), - snapdisk->name, tmp); + snapdisk->name, + virDomainSnapshotLocationTypeToString(default_s= napshot)); return -1; } if (snapdisk->src->path && --=20 2.26.2