summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/vmstat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/vmstat.c b/utils/vmstat.c
index e3944848..92a36726 100644
--- a/utils/vmstat.c
+++ b/utils/vmstat.c
@@ -242,7 +242,8 @@ vm_state_get_field (struct vm_state *state, const struct field *field)
static val_t
get_memobj_hit_ratio (struct vm_state *state, const struct field *field)
{
- return state->vmstats.hits * 100 / state->vmstats.lookups;
+ return (val_t)
+ ((float) state->vmstats.hits * 100. / (float) state->vmstats.lookups);
}
/* Makes sure STATE contains a default pager port and associated info, and