projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tracefile.c: Seek fix
[lttv.git]
/
ltt
/
tracefile.c
diff --git
a/ltt/tracefile.c
b/ltt/tracefile.c
index 0d8a248eb859900525e528445520119247ecc485..012ce10801ec27cf63819614a477ccf5fa173e3d 100644
(file)
--- a/
ltt/tracefile.c
+++ b/
ltt/tracefile.c
@@
-1094,8
+1094,11
@@
int ltt_tracefile_seek_time(LttTracefile *tf, LttTime time)
}
} else if(ltt_time_compare(time, tf->buffer.begin.timestamp) < 0) {
}
} else if(ltt_time_compare(time, tf->buffer.begin.timestamp) < 0) {
- /* go to lower part */
- high = block_num - 1;
+ /*
+ * Go to lower part. We don't want block_num - 1 since block_num
+ * can equal low , in which case high < low.
+ */
+ high = block_num;
} else if(ltt_time_compare(time, tf->buffer.end.timestamp) > 0) {
/* go to higher part */
low = block_num + 1;
} else if(ltt_time_compare(time, tf->buffer.end.timestamp) > 0) {
/* go to higher part */
low = block_num + 1;
This page took
0.022511 seconds
and
4
git commands to generate.