]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virdnsmasq: Require non NULL @caps in dnsmasqCapsGetBinaryPath()
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 10 Jan 2022 15:25:18 +0000 (16:25 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 18 Jan 2022 14:19:47 +0000 (15:19 +0100)
First observation: There is no way that caps->binaryPath can be
NULL. Second observation: There is no caller that passes NULL.
Let's drop the ternary operator and access @caps directly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/util/virdnsmasq.c

index 579c67d86a2047b798df9cc8bedfeaa4137a2fbe..841689b78240ac0df759dc0a54f043d54907f19a 100644 (file)
@@ -711,7 +711,7 @@ dnsmasqCapsNewFromBinary(void)
 const char *
 dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps)
 {
-    return caps ? caps->binaryPath : DNSMASQ;
+    return caps->binaryPath;
 }
 
 /** dnsmasqDhcpHostsToString: