Both callers of dnsmasqCapsNewEmpty() pass DNSMASQ as an argument
which is then fed to a ternary operator which looks like this
(after substitution).
DNSMASQ ? DNSMASQ : DNSMASQ
While I like tautologies, the code can be simplified by dropping
the argument.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virdnsmasq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c
index e5edec2b64..d304929d51 100644
--- a/src/util/virdnsmasq.c
+++ b/src/util/virdnsmasq.c
@@ -700,7 +700,7 @@ dnsmasqCapsRefreshInternal(dnsmasqCaps *caps, bool force)
}
static dnsmasqCaps *
-dnsmasqCapsNewEmpty(const char *binaryPath)
+dnsmasqCapsNewEmpty(void)
{
dnsmasqCaps *caps;
@@ -708,14 +708,14 @@ dnsmasqCapsNewEmpty(const char *binaryPath)
return NULL;
if (!(caps = virObjectNew(dnsmasqCapsClass)))
return NULL;
- caps->binaryPath = g_strdup(binaryPath ? binaryPath : DNSMASQ);
+ caps->binaryPath = g_strdup(DNSMASQ);
return caps;
}
dnsmasqCaps *
dnsmasqCapsNewFromBuffer(const char *buf)
{
- dnsmasqCaps *caps = dnsmasqCapsNewEmpty(DNSMASQ);
+ dnsmasqCaps *caps = dnsmasqCapsNewEmpty();
if (!caps)
return NULL;
@@ -730,7 +730,7 @@ dnsmasqCapsNewFromBuffer(const char *buf)
dnsmasqCaps *
dnsmasqCapsNewFromBinary(void)
{
- dnsmasqCaps *caps = dnsmasqCapsNewEmpty(DNSMASQ);
+ dnsmasqCaps *caps = dnsmasqCapsNewEmpty();
if (!caps)
return NULL;
--
2.34.1