diff options
author | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-12-06 15:00:39 +0300 |
---|---|---|
committer | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-12-06 15:00:39 +0300 |
commit | 2f0a5f947a6cff90e4e1caefff892ee235cbd381 (patch) | |
tree | 37e1ec1e361da1347056461337e5be8e446e11a0 /networking/libiproute | |
parent | d4f15e95d6a66847eee99fb4bb2131d0622ba8b5 (diff) |
restore compare_string_array new interface (make broken by landley)
Diffstat (limited to 'networking/libiproute')
-rw-r--r-- | networking/libiproute/ipaddress.c | 6 | ||||
-rw-r--r-- | networking/libiproute/iproute.c | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 1c89f4a7d..c6115b356 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c @@ -443,7 +443,7 @@ extern int ipaddr_list_or_flush(int argc, char **argv, int flush) } while (argc > 0) { - const unsigned short option_num = compare_string_array(option, *argv); + const int option_num = compare_string_array(option, *argv); switch (option_num) { case 0: /* to */ NEXT_ARG(); @@ -658,7 +658,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) req.ifa.ifa_family = preferred_family; while (argc > 0) { - const unsigned short option_num = compare_string_array(option, *argv); + const int option_num = compare_string_array(option, *argv); switch (option_num) { case 0: /* peer */ case 1: /* remote */ @@ -805,7 +805,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) extern int do_ipaddr(int argc, char **argv) { const char *commands[] = { "add", "delete", "list", "show", "lst", "flush", 0 }; - unsigned short command_num = 2; + int command_num = 2; if (*argv) { command_num = compare_string_array(commands, *argv); diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index cc229c206..d7900d62e 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c @@ -654,7 +654,8 @@ static int iproute_get(int argc, char **argv) char *odev = NULL; int connected = 0; int from_ok = 0; - const char *options[] = { "from", "iif", "oif", "dev", "notify", "connected", "to", 0 }; + static const char * const options[] = + { "from", "iif", "oif", "dev", "notify", "connected", "to", 0 }; memset(&req, 0, sizeof(req)); @@ -813,9 +814,10 @@ static int iproute_get(int argc, char **argv) int do_iproute(int argc, char **argv) { - const char *ip_route_commands[] = { "add", "append", "change", "chg", - "delete", "del", "get", "list", "show", "prepend", "replace", "test", "flush", 0 }; - unsigned short command_num = 7; + static const char * const ip_route_commands[] = + { "add", "append", "change", "chg", "delete", "del", "get", + "list", "show", "prepend", "replace", "test", "flush", 0 }; + int command_num = 7; unsigned int flags = 0; int cmd = RTM_NEWROUTE; |