1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

virdnsmasq: Drop noRefresh member from from struct _dnsmasqCaps

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>
This commit is contained in:
Michal Privoznik 2022-01-17 13:20:32 +01:00
parent 0a7224a147
commit f947b2343a

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