lib: clear error in clock_snapshots_are_monotonic_one
[babeltrace.git] / src / lib / graph / iterator.c
index 121e4bd9a8ed4ca70eb4d6971b83d0d9cd97ea27..40acd76dec671af0546b41db2f5517fce99a0bb1 100644 (file)
@@ -643,8 +643,15 @@ bool clock_snapshots_are_monotonic_one(
                goto end;
        }
 
-       clock_snapshot_status = bt_clock_snapshot_get_ns_from_origin(clock_snapshot, &ns_from_origin);
+       clock_snapshot_status = bt_clock_snapshot_get_ns_from_origin(
+               clock_snapshot, &ns_from_origin);
        if (clock_snapshot_status != BT_FUNC_STATUS_OK) {
+               /*
+                * bt_clock_snapshot_get_ns_from_origin can return
+                * OVERFLOW_ERROR.  We don't really want to report an error to
+                * our caller, so just clear it.
+                */
+               bt_current_thread_clear_error();
                goto end;
        }
 
This page took 0.023535 seconds and 4 git commands to generate.