From 8a4cbfb0aaec6f23c576815e467c60f71e1e8e91 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 4 Jan 2019 15:15:07 +0100 Subject: net: ip_route_get: Fix error message We do getopt(), so the next argument is in argv[optind], not in argv[1]. Signed-off-by: Sascha Hauer --- commands/ip-route-get.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands/ip-route-get.c') diff --git a/commands/ip-route-get.c b/commands/ip-route-get.c index d393218188..7c304694db 100644 --- a/commands/ip-route-get.c +++ b/commands/ip-route-get.c @@ -42,8 +42,8 @@ static int do_ip_route_get(int argc, char *argv[]) ret = string_to_ip(argv[optind], &ip); if (ret) { - printf("Cannot convert %s into a IP address: %s\n", - argv[1], strerror(-ret)); + printf("Cannot convert \"%s\" into a IP address: %s\n", + argv[optind], strerror(-ret)); return 1; } -- cgit v1.2.3