mirror of
https://github.com/sheumann/hush.git
synced 2025-01-11 08:29:54 +00:00
ipaddress: better formatting, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
6a7cd3d4ab
commit
db31c637fa
@ -757,12 +757,16 @@ int FAST_FUNC do_ipaddr(char **argv)
|
|||||||
if (cmd < 0)
|
if (cmd < 0)
|
||||||
invarg(*argv, applet_name);
|
invarg(*argv, applet_name);
|
||||||
argv++;
|
argv++;
|
||||||
if (cmd <= 4)
|
if (cmd <= 4) {
|
||||||
return ipaddr_modify(cmd == 4 ? RTM_DELADDR : RTM_NEWADDR,
|
return ipaddr_modify(
|
||||||
cmd == 0 ? NLM_F_CREATE|NLM_F_EXCL :
|
/*cmd:*/ cmd == 4 ? RTM_DELADDR : RTM_NEWADDR,
|
||||||
cmd == 1 || cmd == 2 ? NLM_F_REPLACE :
|
/*flags:*/
|
||||||
cmd == 3 ? NLM_F_CREATE|NLM_F_REPLACE :
|
cmd == 0 ? NLM_F_CREATE|NLM_F_EXCL : /* add */
|
||||||
0, argv);
|
cmd == 1 || cmd == 2 ? NLM_F_REPLACE : /* change */
|
||||||
|
cmd == 3 ? NLM_F_CREATE|NLM_F_REPLACE : /* replace */
|
||||||
|
0 /* delete */
|
||||||
|
, argv);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ipaddr_list_or_flush(argv, cmd == 8);
|
return ipaddr_list_or_flush(argv, cmd == 8);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user