virdnsmasq: Drop @binaryPath argument from dnsmasqCapsNewEmpty()

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@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Michal Privoznik 2022-01-10 16:15:29 +01:00
parent ce20fe5c2a
commit a7ffa2a647

View File

@ -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;