[PATCH 2/6] chExtractVersionInfo: Don't check for retversion != NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The only caller, chExtractVersion() passes not NULL. Therefore,
it's redundant to check for NULL.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/ch/ch_conf.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

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:
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux