Puzzled at kb_incr in squid-2.5.PRE6.

From: <maer727@dont-contact.us>
Date: Thu, 18 Apr 2002 20:07:30 +0800 (CST)

Hi, pals!

I am using squid-2.5.PRE6. I am puzzled at the following function,
(in TOOLS.c)
void
kb_incr(kb_t * k, size_t v)
{
    k->bytes += v;
    k->kb += (k->bytes >> 10);
    k->bytes &= 0x3FF;
}

I think the function is to change metric from byte to k,
but the does the following statement mean,
    k->bytes &= 0x3FF;

Why should it use "AND" operation?

Best regards
George, Ma
Received on Thu Apr 18 2002 - 06:07:45 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:12 MST