From nobody Fri Dec 19 04:35:10 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1729063416526985.3690254530301; Wed, 16 Oct 2024 00:23:36 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 826BF1590; Wed, 16 Oct 2024 03:23:35 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 734E0143E; Wed, 16 Oct 2024 03:23:17 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7A5E41397; Wed, 16 Oct 2024 03:23:14 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 05CD61287 for ; Wed, 16 Oct 2024 03:23:13 -0400 (EDT) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-394-zAMMVjmFM0Gaq1GHnnF7HA-1; Wed, 16 Oct 2024 03:23:12 -0400 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4312b53256cso23122335e9.2 for ; Wed, 16 Oct 2024 00:23:12 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4313f6b3224sm40581715e9.32.2024.10.16.00.23.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 00:23:10 -0700 (PDT) Received: from wheatley.brq.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id B088D3287522 for ; Wed, 16 Oct 2024 09:23:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729063393; h=from:from: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; bh=BJWec0a7gxHk9KNlO742R4XfiYf6Mwy01M7YwaAmv9M=; b=CrnY4XTNRcgrAXtVxjR1Nct/zadBbY4i33G/9/VgM9UW9FpmZrJcbmgKaUnZodCSYf1o3l GCqBNdWytGCRTSQKYtqQspSKOBKaiKJeJG9WCGPZ1knUgfshLGE7PlVTbbnwG9IS88VbGC ERurEUAnYPcTbS74nNqjad80i1Ba5Dc= X-MC-Unique: zAMMVjmFM0Gaq1GHnnF7HA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729063391; x=1729668191; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BJWec0a7gxHk9KNlO742R4XfiYf6Mwy01M7YwaAmv9M=; b=WJ6+Alf/a41tGZ82QFOlNe1ASwmEp6fPKsi4uaVDLYVb/0Ix/3IyOF1WTfm+BtIzmY OvmV7KGrTU82P9UFBzi3VWYkgTOAoEsrmCEIIOxYfsxxOydS9bwhL++FlhvhVHLfFVOw BnElPp2LM5Soz/ELxc01oZdGkmkNwfsCJ2HiDhFjTa3pngEWnvv1hgsC+s2W9/2pde+C Wx9FrAnQA1BMJ6n3B5mvm0DwxuXFm39beGdOd6h3PYpHJZ4iRqN80QVX83f7AJOM2pEt TOpkCs0Am7/UHONHVlJW1nE1wmaoHmQ9zc1b3HMf+mFqzeSq6J9ZugRIo5NM0fd/yoss sthQ== X-Gm-Message-State: AOJu0Yw+RL3yByeDfCdoB/4O6stUoGrePVsokjYUCYiNsY2mxTnmLwVw 0DFP/6eN+v5oxJ35oxTVLQCeOmpD8aIQHpVw4CT1j2CwW86qhJ8gS2wvsVtNRP9uio+9kF86Bri xQXGo5vUGPPW1J7xNMXFKcQe4zjfPElhuJFz/LFAIdqa2Eq5eJ4oSRY7KCgj/NwCav/NQvoGyGD fmHWT7jAwxEzAh8lYCajBfeOTpe/lNmH8R2Glt218= X-Received: by 2002:a05:600c:5248:b0:42c:bae0:f05b with SMTP id 5b1f17b1804b1-4311deae1a9mr158242495e9.1.1729063391006; Wed, 16 Oct 2024 00:23:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTjN/AlO/ainVmQroM/lgn5aj/Kod1m/NHhZ7OPNm6I+Flx8WqWO635sqv1O4y/H7yLg3k8A== X-Received: by 2002:a05:600c:5248:b0:42c:bae0:f05b with SMTP id 5b1f17b1804b1-4311deae1a9mr158242195e9.1.1729063390540; Wed, 16 Oct 2024 00:23:10 -0700 (PDT) From: Martin Kletzander To: devel@lists.libvirt.org Subject: [PATCH 1/3] qemu_namespace: Rename variable Date: Wed, 16 Oct 2024 09:23:05 +0200 Message-ID: X-Mailer: git-send-email 2.47.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2YJTXLZO7467NN22IW37LBNK5IPCB5LN X-Message-ID-Hash: 2YJTXLZO7467NN22IW37LBNK5IPCB5LN X-MailFrom: mkletzan@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1729063418244116600 Content-Type: text/plain; charset="utf-8"; x-default="true" The boolean actually tells whether the file existed when the function was called and using it in more places later on makes them confusing (e.g. do something with a file if it does not exist). To better reflect the above and prepare for next patch rename this variable. Signed-off-by: Martin Kletzander Reviewed-by: Peter Krempa --- src/qemu/qemu_namespace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c index bbe3d5a1f78a..71e29b4ba4f6 100644 --- a/src/qemu/qemu_namespace.c +++ b/src/qemu/qemu_namespace.c @@ -1002,10 +1002,10 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) bool isDev =3D S_ISCHR(data->sb.st_mode) || S_ISBLK(data->sb.st_mode); bool isReg =3D S_ISREG(data->sb.st_mode) || S_ISFIFO(data->sb.st_mode)= || S_ISSOCK(data->sb.st_mode); bool isDir =3D S_ISDIR(data->sb.st_mode); - bool exists =3D false; + bool existed =3D false; =20 if (virFileExists(data->file)) - exists =3D true; + existed =3D true; =20 if (virFileMakeParentPath(data->file) < 0) { virReportSystemError(errno, @@ -1131,7 +1131,7 @@ qemuNamespaceMknodOne(qemuNamespaceMknodItem *data) virFileMoveMount(data->target, data->file) < 0) goto cleanup; =20 - ret =3D exists; + ret =3D existed; cleanup: if (ret < 0 && delDevice) { if (isDir) --=20 2.47.0