aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-01-17 09:12:01 -0600
committertlatorre <tlatorre@uchicago.edu>2019-01-17 09:12:01 -0600
commitb9491718282f86b77c2594f161b096903706edc1 (patch)
tree79467f20f9e8065666bb8b33202448d23eacbfac /src
parent35770ed49f4d22a577f5ab8b27a97ca8bd2207aa (diff)
downloadsddm-b9491718282f86b77c2594f161b096903706edc1.tar.gz
sddm-b9491718282f86b77c2594f161b096903706edc1.tar.bz2
sddm-b9491718282f86b77c2594f161b096903706edc1.zip
update test-find-peaks to test the first event
Diffstat (limited to 'src')
-rw-r--r--src/test-find-peaks.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test-find-peaks.c b/src/test-find-peaks.c
index ccd581c..0af3fa0 100644
--- a/src/test-find-peaks.c
+++ b/src/test-find-peaks.c
@@ -272,6 +272,18 @@ int main(int argc, char **argv)
goto err;
}
+ /* Skip to the last event so we can traverse them in reverse order. The
+ * reason for this is that for some reason SNOMAN puts the events in
+ * reverse order within each logical record. */
+ while (b.next) {
+ rv = zebra_get_bank(f,&b,b.next);
+
+ if (rv) {
+ fprintf(stderr, "error getting EV bank: %s\n", zebra_err);
+ goto err;
+ }
+ }
+
unpack_ev(b.data, &bev);
ev.run = bev.run;
ev.gtid = bev.gtr_id;