1
0

byte_isequal.c 271 B

12345678910
  1. #include "byte.h"
  2. int byte_isequal(const void *yv,long long ylen,const void *xv)
  3. {
  4. const unsigned char *y = yv;
  5. const unsigned char *x = xv;
  6. unsigned char diff = 0;
  7. while (ylen > 0) { diff |= (*y++ ^ *x++); --ylen; }
  8. return (256 - (unsigned int) diff) >> 8;
  9. }