diff --git a/src/bitmap.c b/src/bitmap.c index a222539..d50e7d6 100644 --- a/src/bitmap.c +++ b/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; diff --git a/src/bitmap.h b/src/bitmap.h index eddf01b..b44ba06 100644 --- a/src/bitmap.h +++ b/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); /** diff --git a/src/simdb-query.c b/src/simdb-query.c index 977953c..fea796f 100644 --- a/src/simdb-query.c +++ b/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; }