[PATCH v1 18/21] suspend.c: remove unneeded cleanup label

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

 



Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
 examples/c/domain/suspend.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/examples/c/domain/suspend.c b/examples/c/domain/suspend.c
index af61129ecc..322f0d60df 100644
--- a/examples/c/domain/suspend.c
+++ b/examples/c/domain/suspend.c
@@ -86,7 +86,6 @@ parse_argv(int argc, char *argv[],
            const char **dom_name,
            unsigned int *seconds)
 {
-    int ret = -1;
     int arg;
     unsigned long val;
     char *p;
@@ -116,12 +115,12 @@ parse_argv(int argc, char *argv[],
             val = strtoul(optarg, &p, 10);
             if (errno || *p || p == optarg) {
                 ERROR("Invalid number: '%s'", optarg);
-                goto cleanup;
+                return -1;
             }
             *seconds = val;
             if (*seconds != val) {
                 ERROR("Integer overflow: %ld", val);
-                goto cleanup;
+                return -1;
             }
             break;
         case ':':
@@ -142,9 +141,7 @@ parse_argv(int argc, char *argv[],
     if (argc > optind)
         *dom_name = argv[optind];
 
-    ret = 0;
- cleanup:
-    return ret;
+    return 0;
 }
 
 static int
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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