Browse Source

* chg simdb_bitmap_diffmap() signature for consistency with other functions

master
Alex 'AdUser' Z 8 years ago
parent
commit
e134a0e5af
  1. 6
      src/bitmap.c
  2. 8
      src/bitmap.h
  3. 2
      src/simdb-query.c

6
src/bitmap.c

@ -55,9 +55,9 @@ simdb_bitmap_compare(const unsigned char *a,
}
size_t
simdb_bitmap_diffmap(unsigned char *diff,
const unsigned char *a,
const unsigned char *b)
simdb_bitmap_diffmap(const unsigned char *a,
const unsigned char *b,
unsigned char *diff)
{
size_t i = 0;

8
src/bitmap.h

@ -29,15 +29,15 @@ simdb_bitmap_compare(const unsigned char *a,
/**
* @brief Make difference map of to bitmaps
* @param diff Storage for difference map
* @param a First bitmap to compare
* @param b Second bitmap to compare
* @param diff Storage for difference map
* @returns Size of generated map (now is @a BITMAP_SIZE)
*/
size_t
simdb_bitmap_diffmap(unsigned char *diff,
const unsigned char *a,
const unsigned char *b);
simdb_bitmap_diffmap(const unsigned char *a,
const unsigned char *b,
unsigned char *diff);
/**

2
src/simdb-query.c

@ -162,7 +162,7 @@ int rec_diff(simdb_t *db, uint64_t a, uint64_t b, unsigned short int showmap)
memcpy(two, &rec.data[REC_OFF_BM], SIMDB_BITMAP_SIZE);
if (showmap) {
simdb_bitmap_diffmap(map, one, two);
simdb_bitmap_diffmap(one, two, map);
simdb_bitmap_print(map);
return 0;
}

Loading…
Cancel
Save