diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-05-25 17:19:35 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-05-25 18:48:33 +0200 |
commit | 96913f9254d288d61d893015f92e9f75b13f5d2a (patch) | |
tree | 861bf36e8176a20555a4f56c55ef609e3eea58c1 | |
parent | ab0e412937a358fe4f7110d4222e12b14f320ad0 (diff) | |
download | busybox-w32-96913f9254d288d61d893015f92e9f75b13f5d2a.tar.gz busybox-w32-96913f9254d288d61d893015f92e9f75b13f5d2a.tar.bz2 busybox-w32-96913f9254d288d61d893015f92e9f75b13f5d2a.zip |
ip tunnel: unify parsing args; no obj-code changes
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r-- | networking/libiproute/iptunnel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c index c36c7136f..257343826 100644 --- a/networking/libiproute/iptunnel.c +++ b/networking/libiproute/iptunnel.c | |||
@@ -561,11 +561,10 @@ int do_iptunnel(char **argv) | |||
561 | static const char keywords[] ALIGN1 = | 561 | static const char keywords[] ALIGN1 = |
562 | "add\0""change\0""delete\0""show\0""list\0""lst\0"; | 562 | "add\0""change\0""delete\0""show\0""list\0""lst\0"; |
563 | enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst }; | 563 | enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst }; |
564 | int key; | ||
565 | 564 | ||
566 | if (*argv) { | 565 | if (*argv) { |
567 | key = index_in_substrings(keywords, *argv); | 566 | smalluint key = index_in_substrings(keywords, *argv); |
568 | if (key < 0) | 567 | if (key > 5) |
569 | bb_error_msg_and_die(bb_msg_invalid_arg, *argv, applet_name); | 568 | bb_error_msg_and_die(bb_msg_invalid_arg, *argv, applet_name); |
570 | argv++; | 569 | argv++; |
571 | if (key == ARG_add) | 570 | if (key == ARG_add) |