lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfWvXkaoYQ_40idSsLYUA=YqaswnV2y-hODHjt7JMHQvQ@mail.gmail.com>
Date:	Sat, 1 Jun 2013 00:05:07 +0300
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	Chen Gang <gang.chen@...anux.com>
Cc:	edumazet@...gle.com, Pravin Shelar <pshelar@...ira.com>,
	mgorman@...e.de, David Miller <davem@...emloft.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] include/linux/skbuff.h: using '0xffff' instead of '~0U'

On Thu, May 30, 2013 at 9:03 AM, Chen Gang <gang.chen@...anux.com> wrote:
>
> Both 'transport_header' and 'mac_header' are u16, which are never equal
> to '~0U'.
>
> So need use '0xffff' instead of '~0U'.

Why not "(u16)~0" ?
Or even better "!= USHORT_MAX"?

Or mac_header + 1 == 0, though it less clear.

--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ