Replace all assert(false) and assert(0) with abort()
[babeltrace.git] / plugins / utils / muxer / muxer.c
index 6fefcf384410220d976661c284c7dbeccb8fb24d..533ccfaa5f937b4a5341b4b66b8d84b8134caf1d 100644 (file)
@@ -41,6 +41,7 @@
 #include <glib.h>
 #include <stdbool.h>
 #include <assert.h>
+#include <stdlib.h>
 
 #define IGNORE_ABSOLUTE_PARAM_NAME     "ignore-absolute"
 
@@ -400,7 +401,8 @@ enum bt_notification_iterator_status muxer_upstream_notif_iter_next(
                 */
                muxer_upstream_notif_iter->is_valid = false;
                break;
-       case BT_NOTIFICATION_ITERATOR_STATUS_END:
+       case BT_NOTIFICATION_ITERATOR_STATUS_END:       /* Fall-through. */
+       case BT_NOTIFICATION_ITERATOR_STATUS_CANCELED:
                /*
                 * Notification iterator reached the end: release it. It
                 * won't be considered again to find the youngest
@@ -565,7 +567,7 @@ int get_notif_ts_ns(struct muxer_comp *muxer_comp,
                        notif, clock_class);
                break;
        default:
-               assert(false);
+               abort();
        }
 
        if (!clock_value) {
@@ -764,7 +766,8 @@ struct bt_notification_iterator_next_return muxer_notif_iter_do_next(
                        muxer_notif_iter, &muxer_upstream_notif_iter,
                        &next_return_ts);
        if (next_return.status < 0 ||
-                       next_return.status == BT_NOTIFICATION_ITERATOR_STATUS_END) {
+                       next_return.status == BT_NOTIFICATION_ITERATOR_STATUS_END ||
+                       next_return.status == BT_NOTIFICATION_ITERATOR_STATUS_CANCELED) {
                goto end;
        }
 
This page took 0.025081 seconds and 4 git commands to generate.