提交 c0666eb7 编写于 作者: D Daniel Henrique Barboza 提交者: Ján Tomko

suspend.c: remove unneeded cleanup label

Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 77e6f13c
...@@ -86,7 +86,6 @@ parse_argv(int argc, char *argv[], ...@@ -86,7 +86,6 @@ parse_argv(int argc, char *argv[],
const char **dom_name, const char **dom_name,
unsigned int *seconds) unsigned int *seconds)
{ {
int ret = -1;
int arg; int arg;
unsigned long val; unsigned long val;
char *p; char *p;
...@@ -116,12 +115,12 @@ parse_argv(int argc, char *argv[], ...@@ -116,12 +115,12 @@ parse_argv(int argc, char *argv[],
val = strtoul(optarg, &p, 10); val = strtoul(optarg, &p, 10);
if (errno || *p || p == optarg) { if (errno || *p || p == optarg) {
ERROR("Invalid number: '%s'", optarg); ERROR("Invalid number: '%s'", optarg);
goto cleanup; return -1;
} }
*seconds = val; *seconds = val;
if (*seconds != val) { if (*seconds != val) {
ERROR("Integer overflow: %ld", val); ERROR("Integer overflow: %ld", val);
goto cleanup; return -1;
} }
break; break;
case ':': case ':':
...@@ -142,9 +141,7 @@ parse_argv(int argc, char *argv[], ...@@ -142,9 +141,7 @@ parse_argv(int argc, char *argv[],
if (argc > optind) if (argc > optind)
*dom_name = argv[optind]; *dom_name = argv[optind];
ret = 0; return 0;
cleanup:
return ret;
} }
static int static int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册