mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
suspend.c: remove unneeded cleanup label
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
77e6f13c1e
commit
c0666eb7c8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user