On 8/1/2017 8:12 AM, David Laight wrote:
From: Stephen Hemminger
quoted
Sent: 01 August 2017 04:52
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.
quoted
+ if ((argc > 0) && (matches(*argv, "tc") == 0)) {
Extra () are unnecessary in compound conditional.
quoted
+ tc = atoi(*argv);
Prefer using strtoul since it has better error handling than atoi()
quoted
Use NEXT_ARG() construct like rest of the code.
Why bother faffing about with argc at all?
The argument list terminates when *argv == NULL.
I'll submit the next version with these fixes.
David