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:
Michal Privoznik 2021-06-04 14:19:15 +02:00
parent 6fcbedad40
commit b5fcd27a08

View File

@ -201,8 +201,7 @@ chExtractVersionInfo(int *retversion)
g_autofree char *ch_cmd = g_find_program_in_path(CH_CMD);
virCommand *cmd = virCommandNewArgList(ch_cmd, "--version", NULL);
if (retversion)
*retversion = 0;
*retversion = 0;
virCommandAddEnvString(cmd, "LC_ALL=C");
virCommandSetOutputBuffer(cmd, &help);
@ -231,9 +230,7 @@ chExtractVersionInfo(int *retversion)
goto cleanup;
}
if (retversion)
*retversion = version;
*retversion = version;
ret = 0;
cleanup: