Commit 9dfa6e19 by Christian Brauner Committed by Stéphane Graber

tools/lxc_stop: use lxc_safe_long()

parent 45cf2817
......@@ -48,7 +48,7 @@ static int my_parser(struct lxc_arguments *args, int c, char *arg)
args->nowait = 1;
break;
case 't':
if (lxc_safe_int(arg, &args->timeout) < 0)
if (lxc_safe_long(arg, &args->timeout) < 0)
return -1;
break;
case 'k':
......@@ -168,17 +168,14 @@ int main(int argc, char *argv[])
/* Set default timeout */
if (my_args.timeout == -2) {
if (my_args.hardstop) {
if (my_args.hardstop)
my_args.timeout = 0;
}
else {
else
my_args.timeout = 60;
}
}
if (my_args.nowait) {
if (my_args.nowait)
my_args.timeout = 0;
}
/* some checks */
if (!my_args.hardstop && my_args.timeout < -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment