]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virdnsmasq: Drop noRefresh member from from struct _dnsmasqCaps
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Jan 2022 12:20:32 +0000 (13:20 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 18 Jan 2022 14:19:47 +0000 (15:19 +0100)
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 <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/util/virdnsmasq.c

index c3801d622f7f7779ad984149e4f618a990b263b8..a8fb91ed2be2521ad4e51c7bad20b5c158c2b43d 100644 (file)
@@ -576,7 +576,6 @@ dnsmasqReload(pid_t pid G_GNUC_UNUSED)
 struct _dnsmasqCaps {
     virObject parent;
     char *binaryPath;
-    bool noRefresh;
     unsigned long version;
 };
 
@@ -609,8 +608,6 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char *buf)
     int len;
     const char *p;
 
-    caps->noRefresh = true;
-
     p = STRSKIP(buf, DNSMASQ_VERSION_STR);
     if (!p)
        goto error;
@@ -656,7 +653,7 @@ dnsmasqCapsRefreshInternal(dnsmasqCaps *caps)
     g_autofree char *version = NULL;
     g_autofree char *complete = NULL;
 
-    if (!caps || caps->noRefresh)
+    if (!caps)
         return 0;
 
     /* Make sure the binary we are about to try exec'ing exists.