[git commit master] ip tunnel: unify parsing args; no obj-code changes
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Tue May 25 16:48:33 UTC 2010
commit: http://git.busybox.net/busybox/commit/?id=96913f9254d288d61d893015f92e9f75b13f5d2a
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
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 c36c713..2573438 100644
--- a/networking/libiproute/iptunnel.c
+++ b/networking/libiproute/iptunnel.c
@@ -561,11 +561,10 @@ int do_iptunnel(char **argv)
static const char keywords[] ALIGN1 =
"add\0""change\0""delete\0""show\0""list\0""lst\0";
enum { ARG_add = 0, ARG_change, ARG_del, ARG_show, ARG_list, ARG_lst };
- int key;
if (*argv) {
- key = index_in_substrings(keywords, *argv);
- if (key < 0)
+ smalluint key = index_in_substrings(keywords, *argv);
+ if (key > 5)
bb_error_msg_and_die(bb_msg_invalid_arg, *argv, applet_name);
argv++;
if (key == ARG_add)
--
1.6.3.3
More information about the busybox-cvs
mailing list