ip-link: cut one level indentation
Cut one level indentation to make things easier to read. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
This commit is contained in:
parent
e3c27c2db6
commit
6843d36e3d
|
|
@ -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)
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue