Re: [PATCH 3/6] libext2fs: add ext2fs_bitcount() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 26, 2012 at 11:30:55AM +0100, Lukáš Czerner wrote:
> > +unsigned int ext2fs_bitcount(const void *addr, unsigned int count)
> > +{
> > +	const unsigned char *cp = addr;
> > +	const __u32 *p = addr;
> > +	unsigned int res = 0;
> > +
> 
> Again it is assumed that 8 will always be aliquot of 'count', but
> it might be worth having a check for that ?

In this case "count" is in bytes, since that's the only thing that
makes sense.  I'll rename the variable to nbytes to make this clear.

      	      	   	      	       	  	    - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux