summaryrefslogtreecommitdiffstats
path: root/runtime/map-values.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/map-values.c')
-rw-r--r--runtime/map-values.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/map-values.c b/runtime/map-values.c
index 3d6af134..6f8adf11 100644
--- a/runtime/map-values.c
+++ b/runtime/map-values.c
@@ -103,7 +103,10 @@ void VALSYM(_stp_map_add_int64) (MAP map, int64_t val)
d->histogram[n]++;
break;
case HIST_LINEAR:
- n = (val - map->hist_start) / map->hist_int;
+ /* n = (val - map->hist_start) / map->hist_int; */
+ val -= map->hist_start;
+ do_div (val, map->hist_int);
+ n = val;
if (n < 0)
n = 0;
if (n >= map->hist_buckets)