From nobody Sun Feb 8 04:23:32 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=1600884940; cv=none; d=zohomail.com; s=zohoarc; b=C45+WgLKDT+TiOSFovGJQVGq8unOkLcCv0aPyDuW9kWzM6QJFf8sNPUSiK9VmunxHE9T9B/e7cwx+odvpOyDA9IDq7nCr1JixYWN0p1IHPCQy9yug1vrZaJZ1Qtt7uEIUCqSl7CljZp6wX1/ka+mUsPi3ogRkuctUnPHg60/a6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600884940; 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=er8N00iQqiW5Tl4snPTr8LD0ZM/7VYKOeWzuJyqR9Yg=; b=jWjyEvW9dBKuBv1HUD3+FSVFlB3n+Gz7NfnMT+gxODC7Gm5Tcn+FrtNcbVt9+vJkDDMP8rTQmfxwlAsb27nhnfXJBr5StSUuMWgIqTkkTNQpZCqDrStDjKID7ss/cKuvq5P6naG4XVMlJJIbU76k4xds4n4fvcW5FzCinDr0Wzg= 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 1600884940766668.7809365167515; Wed, 23 Sep 2020 11:15:40 -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-279-rLWWImCnNc2qby1ogqkAmQ-1; Wed, 23 Sep 2020 14:15:36 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48C0410BBED3; Wed, 23 Sep 2020 18:15:30 +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 237C410021AA; Wed, 23 Sep 2020 18:15:30 +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 DE9F7183D050; Wed, 23 Sep 2020 18:15:29 +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 08NIFGib018153 for ; Wed, 23 Sep 2020 14:15:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id BAD697882C; Wed, 23 Sep 2020 18:15:16 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41E5278823 for ; Wed, 23 Sep 2020 18:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600884939; 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=er8N00iQqiW5Tl4snPTr8LD0ZM/7VYKOeWzuJyqR9Yg=; b=GcyBX35CpT5R+dhkh4HV7ClYcjKKAxvNFzYYA4s6dMZpjOOAr/H12LGWvwpnL043DpJC5U H6hiRKeXuQtrnZOqxYfg6k3VB/irA4oe+PtjJGkFI9THndqrc2B4BO3GTOSEmodPhMEIv1 yxgyjKhZqSKlMLE6hqA5Gm846eG0AXI= X-MC-Unique: rLWWImCnNc2qby1ogqkAmQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 10/14] storage: createFileDir: remove useless 'err' variable Date: Wed, 23 Sep 2020 20:14:59 +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 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.84 on 10.5.11.22 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Signed-off-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/storage/storage_util.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 9171cb084f..93c24ab6bc 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -1997,7 +1997,6 @@ createFileDir(virStoragePoolObjPtr pool, unsigned int flags) { virStoragePoolDefPtr def =3D virStoragePoolObjGetDef(pool); - int err; =20 virCheckFlags(0, -1); =20 @@ -2015,14 +2014,14 @@ createFileDir(virStoragePoolObjPtr pool, } =20 =20 - if ((err =3D virDirCreate(vol->target.path, - (vol->target.perms->mode =3D=3D (mode_t)-1 ? - VIR_STORAGE_DEFAULT_VOL_PERM_MODE : - vol->target.perms->mode), - vol->target.perms->uid, - vol->target.perms->gid, - (def->type =3D=3D VIR_STORAGE_POOL_NETFS - ? VIR_DIR_CREATE_AS_UID : 0))) < 0) { + if (virDirCreate(vol->target.path, + (vol->target.perms->mode =3D=3D (mode_t)-1 ? + VIR_STORAGE_DEFAULT_VOL_PERM_MODE : + vol->target.perms->mode), + vol->target.perms->uid, + vol->target.perms->gid, + (def->type =3D=3D VIR_STORAGE_POOL_NETFS + ? VIR_DIR_CREATE_AS_UID : 0)) < 0) { return -1; } =20 --=20 2.26.2