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

#include <skalibs/bitarray.h>

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