mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-11-28 06:00:36 +00:00
ping: use |=, not =, when combine option bit mask
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
c270454f8f
commit
85164fa06e
@ -726,7 +726,7 @@ static int common_ping_main(int opt, char **argv)
|
|||||||
|
|
||||||
/* exactly one argument needed; -v and -q don't mix; -c NUM, -w NUM, -W NUM */
|
/* exactly one argument needed; -v and -q don't mix; -c NUM, -w NUM, -W NUM */
|
||||||
opt_complementary = "=1:q--v:v--q:c+:w+:W+";
|
opt_complementary = "=1:q--v:v--q:c+:w+:W+";
|
||||||
opt = getopt32(argv, OPT_STRING, &pingcount, &str_s, &deadline, &timeout, &str_I);
|
opt |= getopt32(argv, OPT_STRING, &pingcount, &str_s, &deadline, &timeout, &str_I);
|
||||||
if (opt & OPT_s)
|
if (opt & OPT_s)
|
||||||
datalen = xatou16(str_s); // -s
|
datalen = xatou16(str_s); // -s
|
||||||
if (opt & OPT_I) { // -I
|
if (opt & OPT_I) { // -I
|
||||||
|
Loading…
Reference in New Issue
Block a user