[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH 2/3] refactor: use bitsizeof() instead of 8 * sizeof()
From:       Jeff King <peff () peff ! net>
Date:       2009-07-23 5:11:12
Message-ID: 20090723051112.GA9372 () coredump ! intra ! peff ! net
[Download RAW message or body]

On Wed, Jul 22, 2009 at 10:09:56PM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > On Wed, Jul 22, 2009 at 11:34:34PM +0200, Pierre Habouzit wrote:
> >
> >>  #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
> >> +#define bitsizeof(x)  (CHAR_BIT * sizeof(x))
> >
> > Isn't our style to use all-caps for macros? I.e., BITSIZEOF?
> 
> Perhaps but I'd say similarity between sizeof() and bitsizeof() calls for
> consistency in the lowercase in this particular case.

Fair enough. I just wanted to point it out in case nobody thought of it.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic