From e134a0e5af85e72248730994bdb31705eba73c0c Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 29 Dec 2016 14:04:19 +1000 Subject: [PATCH] * chg simdb_bitmap_diffmap() signature for consistency with other functions --- src/bitmap.c | 6 +++--- src/bitmap.h | 8 ++++---- src/simdb-query.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) 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; }