From nobody Mon Feb 9 10:57:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1642432835; cv=none; d=zohomail.com; s=zohoarc; b=K3dMdqH6Sjsni33ro42OJaF8mBSvC/gc32GB23i/mQGVxRv8KPhPnbQ3pTKgHb8ebpH2GKxEpgzl8fuk30xJ9HAyALQRRPDK7KvQ3pqOQB5TriPsuUYivYLSI5X5cFcq0I8p20G/0qTZhkbfSlTb+VfO79U5OUs5OOZi7bAzmHM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642432835; 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=CKC7Ibhm7CLsmsK5Et61eAYmWMlOsHFmExaQeHVwuI0=; b=oGwwa31rYitwtWu5GOoHeV1mIeO3DqC28XDTtrjVgqLsFjaKSwxpkV6Dk9x3UL5JOyRRiHQPgVEPmt3b/dPVKyjCnjLkO05UEc4zI71hQRTa1T2GhOnfEIupG1K/1MwETskbQy3oveQ6z3etdu6L81WaKZoRwD5S57xF1lLG9Dk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1642432835835345.5303531617342; Mon, 17 Jan 2022 07:20:35 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-216-0FlxLxdxOKiVkIc7ItgiRw-1; Mon, 17 Jan 2022 10:20:31 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EE1FA85EE6C; Mon, 17 Jan 2022 15:20:01 +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 C867377467; Mon, 17 Jan 2022 15:20:01 +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 955134A7C8; Mon, 17 Jan 2022 15:20:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFJXds031521 for ; Mon, 17 Jan 2022 10:19:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 89D8D26576; Mon, 17 Jan 2022 15:19:33 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1368A2B5A5 for ; Mon, 17 Jan 2022 15:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642432834; 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=CKC7Ibhm7CLsmsK5Et61eAYmWMlOsHFmExaQeHVwuI0=; b=AqCZ/MQwMrkDeyjJFCXMp8NMbmAYzJpWE4Zo874m+ZwM7nLDG7+vUo2819j1FNcdA1UCEa 9x28b2HVkw3kVLGIysKerjxtOpEtfLulRlt6DYXZSgwGPAiH2sSoXS+ycg87VjKNJoDh8Z GZroN21dBfWAYJVkByRyqsIz4ceg3GE= X-MC-Unique: 0FlxLxdxOKiVkIc7ItgiRw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v4 05/13] virdnsmasq: Drop noRefresh member from from struct _dnsmasqCaps Date: Mon, 17 Jan 2022 16:19:19 +0100 Message-Id: <956a55c8a6b7ab0623361c80abe8495506b9c564.1642432611.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.15 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) X-ZM-MESSAGEID: 1642432838119100001 Content-Type: text/plain; charset="utf-8" The noRefresh member of _dnsmasqCaps struct is set only after it was checked for and is never checked again. This is needless and the member can be removed. There is no way that dnsmasqCapsRefreshInternal() can be called after dnsmasqCapsSetFromBuffer(). Signed-off-by: Michal Privoznik --- src/util/virdnsmasq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index c3801d622f..a8fb91ed2b 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -576,7 +576,6 @@ dnsmasqReload(pid_t pid G_GNUC_UNUSED) struct _dnsmasqCaps { virObject parent; char *binaryPath; - bool noRefresh; unsigned long version; }; =20 @@ -609,8 +608,6 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char = *buf) int len; const char *p; =20 - caps->noRefresh =3D true; - p =3D STRSKIP(buf, DNSMASQ_VERSION_STR); if (!p) goto error; @@ -656,7 +653,7 @@ dnsmasqCapsRefreshInternal(dnsmasqCaps *caps) g_autofree char *version =3D NULL; g_autofree char *complete =3D NULL; =20 - if (!caps || caps->noRefresh) + if (!caps) return 0; =20 /* Make sure the binary we are about to try exec'ing exists. --=20 2.34.1