[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170731205133.5e58e47c@xeon-e3>
Date: Mon, 31 Jul 2017 20:51:33 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Amritha Nambiar <amritha.nambiar@...el.com>
Cc: netdev@...r.kernel.org, alexander.h.duyck@...el.com,
kiran.patil@...el.com, sridhar.samudrala@...el.com,
mitch.a.williams@...el.com, alexander.duyck@...il.com,
neerav.parikh@...el.com, carolyn.wyborny@...el.com,
jeffrey.t.kirsher@...el.com
Subject: Re: [PATCH RFC, iproute2] tc/mirred: Extend the mirred/redirect
action to accept additional traffic class parameter
On Mon, 31 Jul 2017 17:40:50 -0700
Amritha Nambiar <amritha.nambiar@...el.com> 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()
> + argc--;
> + argv++;
> + }
Use NEXT_ARG() construct like rest of the code.
Powered by blists - more mailing lists