From: Michal Privoznik Date: Mon, 10 Jan 2022 15:25:18 +0000 (+0100) Subject: virdnsmasq: Require non NULL @caps in dnsmasqCapsGetBinaryPath() X-Git-Tag: v8.1.0-rc1~401 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b68c982e283471575bacbf87302495864da46fe;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Andrea Bolognani --- diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 579c67d86a..841689b782 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -711,7 +711,7 @@ dnsmasqCapsNewFromBinary(void) const char * dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps) { - return caps ? caps->binaryPath : DNSMASQ; + return caps->binaryPath; } /** dnsmasqDhcpHostsToString: