Commit f7b2b8fd authored by Shane Snyder's avatar Shane Snyder

bug fix for common access counter updates

parent 79ec4106
......@@ -95,7 +95,7 @@
if(*(int64_t *)__vals == 0) break; \
for(i_=0; i_<4; i_++) { \
if(__add_flag && \
!memcmp(__val_p + (i_ * sizeof(*__vals) * __val_size), \
!memcmp(__val_p + (i_ * __val_size), \
__vals, sizeof(*__vals) * __val_size)) { \
total_count += *(__cnt_p + i_); \
break; \
......@@ -107,8 +107,8 @@
for(i_=0; i_ < 4; i_++) { \
if((*(__cnt_p + i_) > total_count) || \
((*(__cnt_p + i_) == total_count) && \
(*(__val_p + (i_ * sizeof(*__vals) * __val_size)) > *(int64_t *)__vals))) { \
memcpy(&tmp_val[tmp_ndx * __val_size], __val_p + (i_ * sizeof(*__vals) * __val_size), \
(*(__val_p + (i_ * __val_size)) > *(int64_t *)__vals))) { \
memcpy(&tmp_val[tmp_ndx * __val_size], __val_p + (i_ * __val_size), \
sizeof(*__vals) * __val_size); \
tmp_cnt[tmp_ndx] = *(__cnt_p + i_); \
tmp_ndx++; \
......@@ -122,9 +122,9 @@
tmp_ndx++; \
/* last, copy over any remaining counters to make sure we have 4 sets total */ \
while(tmp_ndx != 4) { \
if(memcmp(__val_p + (i_ * sizeof(*__vals) * __val_size), \
if(memcmp(__val_p + (i_ * __val_size), \
__vals, sizeof(*__vals) * __val_size)) { \
memcpy(&tmp_val[tmp_ndx * __val_size], __val_p + (i_ * sizeof(*__vals) * __val_size), \
memcpy(&tmp_val[tmp_ndx * __val_size], __val_p + (i_ * __val_size), \
sizeof(*__vals) * __val_size); \
tmp_cnt[tmp_ndx] = *(__cnt_p + i_); \
tmp_ndx++; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment