[PATCH v5 05/13] virdnsmasq: Drop noRefresh member from from struct _dnsmasqCaps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 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;
 };
 
@@ -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.
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux