[git commit] ipaddress: better formatting, no code changes

Denys Vlasenko vda.linux at googlemail.com
Wed Jul 1 16:36:06 UTC 2015


commit: http://git.busybox.net/busybox/commit/?id=db31c637fa72cfdc546dd85e10d231a0fdce2b1e
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/libiproute/ipaddress.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index 85f3356..a6d5129 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -757,12 +757,16 @@ int FAST_FUNC do_ipaddr(char **argv)
 		if (cmd < 0)
 			invarg(*argv, applet_name);
 		argv++;
-		if (cmd <= 4)
-			return ipaddr_modify(cmd == 4 ? RTM_DELADDR : RTM_NEWADDR,
-						cmd == 0 ? NLM_F_CREATE|NLM_F_EXCL :
-						cmd == 1 || cmd == 2 ? NLM_F_REPLACE :
-						cmd == 3 ? NLM_F_CREATE|NLM_F_REPLACE :
-						0, argv);
+		if (cmd <= 4) {
+			return ipaddr_modify(
+				/*cmd:*/ cmd == 4 ? RTM_DELADDR : RTM_NEWADDR,
+				/*flags:*/
+					cmd == 0 ? NLM_F_CREATE|NLM_F_EXCL : /* add */
+					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);
 }


More information about the busybox-cvs mailing list