diff mbox series

[2/2] kernel-shark: Fix a bug in ksmodel_set_next_bin_edge() part III

Message ID 20190612142053.14439-2-ykaradzhov@vmware.com (mailing list archive)
State Superseded
Headers show
Series [1/2] kernel-shark: Fix a bug in ksmodel_set_next_bin_edge() part II | expand

Commit Message

Yordan Karadzhov June 12, 2019, 2:20 p.m. UTC
All time stamps of the trace records are coded with 64 bits, however
on some systems the size_t type can be 32 bits.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark/src/libkshark-model.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel-shark/src/libkshark-model.c b/kernel-shark/src/libkshark-model.c
index 0cac924..dde64de 100644
--- a/kernel-shark/src/libkshark-model.c
+++ b/kernel-shark/src/libkshark-model.c
@@ -260,7 +260,8 @@  static size_t ksmodel_set_upper_edge(struct kshark_trace_histo *histo)
 static void ksmodel_set_next_bin_edge(struct kshark_trace_histo *histo,
 				      size_t bin, size_t last_row)
 {
-	size_t time_min, time_max, next_bin = bin + 1;
+	uint64_t time_min, time_max;
+	size_t next_bin = bin + 1;
 	ssize_t row;
 
 	/* Calculate the beginning and the end of the next bin. */