From: Daniel Henrique Barboza Date: Mon, 21 Oct 2019 18:19:08 +0000 (-0300) Subject: suspend.c: remove unneeded cleanup label X-Git-Tag: v5.10.0-rc1~272 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0666eb7c802ee99d8ca98f22d51f23f1fff1208;p=thirdparty%2Flibvirt.git suspend.c: remove unneeded cleanup label Signed-off-by: Daniel Henrique Barboza Reviewed-by: Ján Tomko --- 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