[PATCH v5 06/13] virdnsmasq: Drop !caps check from dnsmasqCapsRefreshInternal()

Michal Privoznik mprivozn at redhat.com
Tue Jan 18 14:37:13 UTC 2022


There is no way that the dnsmasqCapsRefreshInternal() function
can be called with @caps == NULL. Therefore, drop the if() that
checks for that.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
Reviewed-by: Andrea Bolognani <abologna at redhat.com>
---
 src/util/virdnsmasq.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c
index a8fb91ed2b..9f50ce7755 100644
--- a/src/util/virdnsmasq.c
+++ b/src/util/virdnsmasq.c
@@ -653,9 +653,6 @@ dnsmasqCapsRefreshInternal(dnsmasqCaps *caps)
     g_autofree char *version = NULL;
     g_autofree char *complete = NULL;
 
-    if (!caps)
-        return 0;
-
     /* Make sure the binary we are about to try exec'ing exists.
      * Technically we could catch the exec() failure, but that's
      * in a sub-process so it's hard to feed back a useful error.
-- 
2.34.1




More information about the libvir-list mailing list