1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-10-27 11:34:09 +03:00

tools: remove unread variables

Some of libvirt APIs return the number of elements, but we
don't need them, only whether the API failed or not.

Delete the redundant variables.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Ján Tomko
2020-08-02 23:33:07 +02:00
parent ce2483f619
commit 9c4730c54b
2 changed files with 6 additions and 10 deletions

View File

@@ -1037,7 +1037,6 @@ static const vshCmdOptDef opts_daemon_log_filters[] = {
static bool
cmdDaemonLogFilters(vshControl *ctl, const vshCmd *cmd)
{
int nfilters;
char *filters = NULL;
vshAdmControlPtr priv = ctl->privData;
@@ -1049,8 +1048,8 @@ cmdDaemonLogFilters(vshControl *ctl, const vshCmd *cmd)
return false;
}
} else {
if ((nfilters = virAdmConnectGetLoggingFilters(priv->conn,
&filters, 0)) < 0) {
if (virAdmConnectGetLoggingFilters(priv->conn,
&filters, 0) < 0) {
vshError(ctl, _("Unable to get daemon logging filters information"));
return false;
}
@@ -1091,7 +1090,6 @@ static const vshCmdOptDef opts_daemon_log_outputs[] = {
static bool
cmdDaemonLogOutputs(vshControl *ctl, const vshCmd *cmd)
{
int noutputs;
char *outputs = NULL;
vshAdmControlPtr priv = ctl->privData;
@@ -1103,8 +1101,7 @@ cmdDaemonLogOutputs(vshControl *ctl, const vshCmd *cmd)
return false;
}
} else {
if ((noutputs = virAdmConnectGetLoggingOutputs(priv->conn,
&outputs, 0)) < 0) {
if (virAdmConnectGetLoggingOutputs(priv->conn, &outputs, 0) < 0) {
vshError(ctl, _("Unable to get daemon logging outputs information"));
return false;
}