Thread (7 messages) 7 messages, 5 authors, 2017-08-02

Re: [PATCH RFC, iproute2] tc/mirred: Extend the mirred/redirect action to accept additional traffic class parameter

flat view

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2017-08-01 03:51:36

On Mon, 31 Jul 2017 17:40:50 -0700
Amritha Nambiar [off-list ref] wrote:
The concept is fine, bu t the code looks different than the rest which
is never a good sign.

+				if ((argc > 0) && (matches(*argv, "tc") == 0)) {
Extra () are unnecessary in compound conditional.
+					tc = atoi(*argv);
Prefer using strtoul since it has better error handling than atoi()
quoted hunk ↗ jump to hunk
+					argc--;
+					argv++;
+				}

Use NEXT_ARG() construct like rest of the code.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help