afl-fuzz.c
static u32 count_bytes(u8* mem) {

  u32* ptr = (u32*)mem;
  u32  i   = (afl_map_size >> 2);
  u32  ret = 0;

  while (i--) {

    u32 v = *(ptr++);

    if (!v) continue;
    if (v & FF(0)) ret++;
    if (v & FF(1)) ret++;
    if (v & FF(2)) ret++;
    if (v & FF(3)) ret++;

  }

  return ret;

}
/* Count the number of bytes set in the bitmap. Called fairly sporadically,
   mostly to update the status screen or calibrate and examine confirmed
   new paths. */
Count the number of bytes set in the bitmap. Called fairly sporadically,
mostly to update the status screen or calibrate and examine confirmed
new paths.
Count the number of bytes set in the bitmap . Called fairly sporadically mostly to update the status screen or calibrate and examine confirmed new paths .
static u32 count_bytes(u8* mem) {
  u32* ptr = (u32*)mem;
  u32  i   = (afl_map_size >> 2);
  u32  ret = 0;
  while (i--) {
    u32 v = *(ptr++);
    if (!v) continue;
    if (v & FF(0)) ret++;
    if (v & FF(1)) ret++;
    if (v & FF(2)) ret++;
    if (v & FF(3)) ret++;
  }
  return ret;
}
static u32 count_bytes ( u8 * mem ) { u32 * ptr = ( u32 * ) mem ; u32 i = ( afl_map_size >> 2 ) ; u32 ret = 0 ; while ( i -- ) { u32 v = * ( ptr ++ ) ; if ( ! v ) continue ; if ( v & FF ( 0 ) ) ret ++ ; if ( v & FF ( 1 ) ) ret ++ ; if ( v & FF ( 2 ) ) ret ++ ; if ( v & FF ( 3 ) ) ret ++ ; } return ret ; }
Count the number of bytes set in the bitmap.
Count the number of bytes set in the bitmap .