[PATCH 2/4] examples/dommigrate: Don't set retval in usage()

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

 



The usage() function should just print expected arguments. Make
the function return void then.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 examples/c/domain/dommigrate.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/examples/c/domain/dommigrate.c b/examples/c/domain/dommigrate.c
index 60cfb3fb83..b1641efb9a 100644
--- a/examples/c/domain/dommigrate.c
+++ b/examples/c/domain/dommigrate.c
@@ -26,11 +26,10 @@
 #include <libvirt/virterror.h>
 
 
-static int
-usage(char *prgn, int ret)
+static void
+usage(char *prgn)
 {
     printf("Usage: %s <src uri> <dst uri> <domain name>\n", prgn);
-    return ret;
 }
 
 int
@@ -42,7 +41,7 @@ main(int argc, char *argv[])
     virDomainPtr dom = NULL;
 
     if (argc < 4) {
-        ret = usage(argv[0], 1);
+        usage(argv[0]);
         goto out;
     }
 
-- 
2.32.0




[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