[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLH=VP1i=KS5QV1x41EpQM5-o1TJfDh01Y++bMpFpfBRg@mail.gmail.com>
Date: Wed, 24 Oct 2018 10:03:08 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: joe@...ches.com
Cc: Willy Tarreau <w@....eu>, wanghaifine@...il.com,
David Miller <davem@...emloft.net>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
netdev <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Change judgment len position
On Wed, Oct 24, 2018 at 9:54 AM Joe Perches <joe@...ches.com> wrote:
> I think if the point is to test for negative numbers,
> it's clearer to do that before using min_t.and it's
> probably clearer not to use min_t at all.
>
...
>
> if (len > sizeof(int))
> len = sizeof(int);
It is a matter of taste really, I know some people (like me) sometimes
mixes min() and max()
I would suggest that if someones wants to change the current code, a
corresponding test
would be added in tools/testing/selftests/net
Powered by blists - more mailing lists