[PATCH v3 4/7] virdnsmasq: Require non NULL @caps in dnsmasqCapsGetBinaryPath()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 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 79060e2021..6d63e9e3c5 100644
--- a/src/util/virdnsmasq.c
+++ b/src/util/virdnsmasq.c
@@ -739,7 +739,7 @@ dnsmasqCapsNewFromBinary(void)
 const char *
 dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps)
 {
-    return caps ? caps->binaryPath : DNSMASQ;
+    return caps->binaryPath;
 }
 
 /** dnsmasqDhcpHostsToString:
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux