while (bits > 8)
while (bits >= 8)
match_prefix (const struct sockaddr_storage *ss, const struct prefixlist *list,	      int default_val){  int idx;  struct sockaddr_in6 in6_mem;  const struct sockaddr_in6 *in6;  if (ss->ss_family == PF_INET6)    in6 = (const struct sockaddr_in6 *) ss;  else if (ss->ss_family == PF_INET)    {      const struct sockaddr_in *in = (const struct sockaddr_in *) ss;      /* Convert to IPv6 address.  */      in6_mem.sin6_family = PF_INET6;      in6_mem.sin6_port = in->sin_port;      in6_mem.sin6_flowinfo = 0;      if (in->sin_addr.s_addr == htonl (0x7f000001))	in6_mem.sin6_addr = (struct in6_addr) IN6ADDR_LOOPBACK_INIT;      else	{	  /* Construct a V4-to-6 mapped address.  */	  memset (&in6_mem.sin6_addr, '\0', sizeof (in6_mem.sin6_addr));	  in6_mem.sin6_addr.s6_addr16[5] = 0xffff;	  in6_mem.sin6_addr.s6_addr32[3] = in->sin_addr.s_addr;	  in6_mem.sin6_scope_id = 0;	}      in6 = &in6_mem;    }  else    return default_val;  for (idx = 0; ; ++idx)    {      unsigned int bits = list[idx].bits;      uint8_t *mask = list[idx].prefix.s6_addr;      uint8_t *val = in6->sin6_addr.s6_addr;      while (bits > 8)	{	  if (*mask != *val)	    break;	  ++mask;	  ++val;	  bits -= 8;	}      if (bits < 8)	{	  if ((*mask & (0xff00 >> bits)) == (*val & (0xff00 >> bits)))	    /* Match!  */	    break;	}    }  return list[idx].val;}