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: <CAHp75Vc19Kii7_TF+9aF4ZeKAa4_92DCVL+u1duZDTu38o2qsw@mail.gmail.com>
Date:	Mon, 3 Jun 2013 13:14:39 +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>,
	Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [PATCH] include/linux/skbuff.h: using '0xffff' instead of '~0U'

On Mon, Jun 3, 2013 at 12:23 PM, Chen Gang <gang.chen@...anux.com> wrote:
> On 06/01/2013 05:05 AM, Andy Shevchenko wrote:

>> Why not "(u16)~0" ?
> We'd better to give a meaningful name to it just like Ben said.

Yeah, you could give a name, though I don't see this needs for
constants like (u16)~0. It's a usual way to mark some values
uninitialized.
Just an example from kernel:

        /* This is limited by 16 bit "slot" numbers,
         * and by available on-disk context storage.
         *
         * Also (u16)~0 is special (denotes a "free" extent).

--
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