mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
chExtractVersionInfo: Don't check for retversion != NULL
The only caller, chExtractVersion() passes not NULL. Therefore, it's redundant to check for NULL. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
6fcbedad40
commit
b5fcd27a08
@ -201,8 +201,7 @@ chExtractVersionInfo(int *retversion)
|
|||||||
g_autofree char *ch_cmd = g_find_program_in_path(CH_CMD);
|
g_autofree char *ch_cmd = g_find_program_in_path(CH_CMD);
|
||||||
virCommand *cmd = virCommandNewArgList(ch_cmd, "--version", NULL);
|
virCommand *cmd = virCommandNewArgList(ch_cmd, "--version", NULL);
|
||||||
|
|
||||||
if (retversion)
|
*retversion = 0;
|
||||||
*retversion = 0;
|
|
||||||
|
|
||||||
virCommandAddEnvString(cmd, "LC_ALL=C");
|
virCommandAddEnvString(cmd, "LC_ALL=C");
|
||||||
virCommandSetOutputBuffer(cmd, &help);
|
virCommandSetOutputBuffer(cmd, &help);
|
||||||
@ -231,9 +230,7 @@ chExtractVersionInfo(int *retversion)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retversion)
|
*retversion = version;
|
||||||
*retversion = version;
|
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user