1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

virdnsmasq: Require non NULL @caps in dnsmasqCapsGetBinaryPath()

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>
This commit is contained in:
Michal Privoznik 2022-01-10 16:25:18 +01:00
parent 5c98d1cee0
commit 4b68c982e2

View File

@ -711,7 +711,7 @@ dnsmasqCapsNewFromBinary(void)
const char * const char *
dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps) dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps)
{ {
return caps ? caps->binaryPath : DNSMASQ; return caps->binaryPath;
} }
/** dnsmasqDhcpHostsToString: /** dnsmasqDhcpHostsToString: