shell ping6: do not try to parse address as count
The first parameter should be handled as count only if there are at least two parameters given.
This commit is contained in:
parent
f789d9180a
commit
ee33e6941b
@ -161,11 +161,7 @@ int _icmpv6_ping(int argc, char **argv)
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
else if ((count = atoi(argv[1])) > 0) {
|
||||
if (argc < 3) {
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
else if ((argc > 2) && ((count = atoi(argv[1])) > 0)) {
|
||||
param_offset = 1;
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user