From: Michal Privoznik Date: Fri, 4 Jun 2021 12:19:15 +0000 (+0200) Subject: chExtractVersionInfo: Don't check for retversion != NULL X-Git-Tag: v7.5.0-rc1~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5fcd27a08042e588c1cc159a6d99642ec6a4541;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Daniel P. Berrangé --- diff --git a/src/ch/ch_conf.c b/src/ch/ch_conf.c index d900ebc7dd..706e5f0ba4 100644 --- a/src/ch/ch_conf.c +++ b/src/ch/ch_conf.c @@ -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: