[PATCH 3/3] virdnsmasq: Require non NULL @caps in dnsmasqCapsGetBinaryPath()
Michal Privoznik
mprivozn at redhat.com
Mon Jan 10 15:44:57 UTC 2022
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 at redhat.com>
---
src/util/virdnsmasq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c
index b6ccb9d0a4..a869b398c7 100644
--- a/src/util/virdnsmasq.c
+++ b/src/util/virdnsmasq.c
@@ -745,7 +745,7 @@ dnsmasqCapsNewFromBinary(void)
const char *
dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps)
{
- return caps ? caps->binaryPath : DNSMASQ;
+ return caps->binaryPath;
}
/** dnsmasqDhcpHostsToString:
--
2.34.1
More information about the libvir-list
mailing list