]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
networkRefreshDhcpDaemon: Get dnsmasq's PID once
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Apr 2023 08:10:15 +0000 (10:10 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 19 Apr 2023 13:00:51 +0000 (15:00 +0200)
This is a relic of commit v3.7.0-rc1~132 when getter/setter APIs
for dnsmasq's PID were introduced. Previously, obj->dnsmasqPid
was accessed directly. But the aforementioned commit introduced
two calls to virNetworkObjGetDnsmasqPid() even though the result
of the first call is stored in a variable.

Remove the second call as it's unnecessary.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/network/bridge_driver.c

index 7f2298a15e287f28ed06bdf13bb9e25235112dcc..9eb543a0a35a1792aff86437e0f73b44c5aab384 100644 (file)
@@ -1599,7 +1599,6 @@ networkRefreshDhcpDaemon(virNetworkDriverState *driver,
     if (dnsmasqSave(dctx) < 0)
         return -1;
 
-    dnsmasqPid = virNetworkObjGetDnsmasqPid(obj);
     return kill(dnsmasqPid, SIGHUP);
 
 }