[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B71CA@saturn3.aculab.com>
Date: Wed, 10 Apr 2013 14:05:09 +0100
From: "David Laight" <David.Laight@...LAB.COM>
To: "Denis Kirjanov" <kda@...ux-powerpc.org>,
"Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>
Cc: "Jason Baron" <jbaron@...hat.com>, <netdev@...r.kernel.org>,
"Trond Myklebust" <Trond.Myklebust@...app.com>,
"Andrew Morton" <akpm@...ux-foundation.org>
Subject: RE: [PATCH] lib, net: make isodigit public and use it
> what about #define isoctal(c) (((c) & ~7) ?
I presume you meant (((c) & ~7) == '0')
Actually the compiler will convert:
c >= '0' && c <= '7';
into
(unsigned)(c - '0') <= '7' - '0';
so it makes no significant difference.
Whether adding it to ctype.h is a good idea is a different
problem for the C standards people.
David
--
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