summaryrefslogtreecommitdiff
path: root/src/libstddjb/bitarray_and.c
blob: 449f300ed663821e8d312016edfa3e2fec361a60 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <sys/types.h>
#include <skalibs/bitarray.h>

void bitarray_and (unsigned char *c, unsigned char const *a, unsigned char const *b, size_t n)
{
  size_t len = bitarray_div8(n) ;
  register size_t i = 0 ;
  for (; i < len ; i++) c[i] = a[i] & b[i] ;
}