[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200811212059.lhbht3jdfxco2i4m@carpenter>
Date: Tue, 11 Aug 2020 23:20:59 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH ethtool 3/7] ioctl: get rid of signed/unsigned comparison
warnings
On Mon, Aug 10, 2020 at 04:19:24PM +0200, Andrew Lunn wrote:
> > - while (arg_num < ctx->argc) {
> > + while (arg_num < (unsigned int)ctx->argc) {
>
> Did you try changing ctx->argc to an unsigned int? I guess there would
> be less casts that way, and it is a more logical type for this.
>
> Andrew
I tried now and the number of changes in ethtool.c is not as bad as
I thought. I even found one missing check which could allow argc to fall
below 0.
Michal
Powered by blists - more mailing lists