Commit 6843d36e authored by Zhang Shengju's avatar Zhang Shengju Committed by Stephen Hemminger

ip-link: cut one level indentation

Cut one level indentation to make things easier to read.
Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
parent e3c27c2d
...@@ -1184,7 +1184,9 @@ static void do_help(int argc, char **argv) ...@@ -1184,7 +1184,9 @@ static void do_help(int argc, char **argv)
int do_iplink(int argc, char **argv) int do_iplink(int argc, char **argv)
{ {
if (argc > 0) { if (argc < 1)
return ipaddr_list_link(0, NULL);
if (iplink_have_newlink()) { if (iplink_have_newlink()) {
if (matches(*argv, "add") == 0) if (matches(*argv, "add") == 0)
return iplink_modify(RTM_NEWLINK, return iplink_modify(RTM_NEWLINK,
...@@ -1215,9 +1217,8 @@ int do_iplink(int argc, char **argv) ...@@ -1215,9 +1217,8 @@ int do_iplink(int argc, char **argv)
do_help(argc-1, argv+1); do_help(argc-1, argv+1);
return 0; return 0;
} }
} else
return ipaddr_list_link(0, NULL);
fprintf(stderr, "Command \"%s\" is unknown, try \"ip link help\".\n", *argv); fprintf(stderr, "Command \"%s\" is unknown, try \"ip link help\".\n",
*argv);
exit(-1); exit(-1);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment