lib: return `void` when setting a simple value with no side effects
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 30 Nov 2018 20:31:39 +0000 (15:31 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 2 May 2019 20:50:15 +0000 (20:50 +0000)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
24 files changed:
include/babeltrace/graph/private-notification-inactivity.h
include/babeltrace/graph/private-notification-stream.h
include/babeltrace/graph/self-component-port.h
include/babeltrace/trace-ir/private-clock-class.h
include/babeltrace/trace-ir/private-event-class.h
include/babeltrace/trace-ir/private-event.h
include/babeltrace/trace-ir/private-field-classes.h
include/babeltrace/trace-ir/private-packet.h
include/babeltrace/trace-ir/private-stream-class.h
include/babeltrace/trace-ir/private-trace.h
lib/graph/notification/inactivity.c
lib/graph/notification/stream.c
lib/trace-ir/clock-class.c
lib/trace-ir/event-class.c
lib/trace-ir/event.c
lib/trace-ir/field-classes.c
lib/trace-ir/packet.c
lib/trace-ir/stream-class.c
lib/trace-ir/trace.c
plugins/ctf/common/metadata/ctf-meta-translate.c
plugins/ctf/common/metadata/visitor-generate-ir.c
plugins/ctf/common/notif-iter/notif-iter.c
plugins/text/dmesg/dmesg.c
tests/lib/test_trace_ir_ref.c

index ca8253edf14a17f57fc64aaa3eb26eb666891e5a..5649ffc186d1f304eb445c989cbfdf6194e0a9b6 100644 (file)
@@ -38,7 +38,7 @@ struct bt_private_notification *bt_private_notification_inactivity_create(
                struct bt_self_notification_iterator *notification_iterator,
                struct bt_clock_class *default_clock_class);
 
-extern int bt_private_notification_inactivity_set_default_clock_value(
+extern void bt_private_notification_inactivity_set_default_clock_value(
                struct bt_private_notification *notif, uint64_t raw_value);
 
 #ifdef __cplusplus
index f5bc2d61561739caa6e19a78ba769a33aa4437a6..de0324a2c62f7213a3a479499dbb4882da1044ee 100644 (file)
@@ -49,14 +49,14 @@ extern struct bt_private_stream *
 bt_private_notification_stream_begin_borrow_stream(
                struct bt_private_notification *notification);
 
-extern int bt_private_notification_stream_begin_set_default_clock_value(
+extern void bt_private_notification_stream_begin_set_default_clock_value(
                struct bt_private_notification *notif, uint64_t value_cycles);
 
 extern struct bt_private_stream *
 bt_private_notification_stream_end_borrow_stream(
                struct bt_private_notification *notification);
 
-extern int bt_private_notification_stream_end_set_default_clock_value(
+extern void bt_private_notification_stream_end_set_default_clock_value(
                struct bt_private_notification *notif, uint64_t value_cycles);
 
 #ifdef __cplusplus
index 753cba54934a92b7e9c711ef4ee091620a8b0d59..f8866b1b177ea6f3da3422a564ee5e187e55bf87 100644 (file)
@@ -34,7 +34,6 @@ struct bt_connection;
 
 enum bt_self_component_port_status {
        BT_SELF_PORT_STATUS_OK = 0,
-       BT_SELF_PORT_STATUS_ERROR = -1,
 };
 
 static inline
index f33cf4796029da35d91f0343f6e2231e1b5c8518..39a2b485b3531015c66e5018b0aab796e1763ad6 100644 (file)
@@ -58,22 +58,22 @@ extern int bt_private_clock_class_set_description(
                struct bt_private_clock_class *clock_class,
                const char *description);
 
-extern int bt_private_clock_class_set_frequency(
+extern void bt_private_clock_class_set_frequency(
                struct bt_private_clock_class *clock_class, uint64_t freq);
 
-extern int bt_private_clock_class_set_precision(
+extern void bt_private_clock_class_set_precision(
                struct bt_private_clock_class *clock_class,
                uint64_t precision);
 
-extern int bt_private_clock_class_set_offset(
+extern void bt_private_clock_class_set_offset(
                struct bt_private_clock_class *clock_class,
                int64_t seconds, uint64_t cycles);
 
-extern int bt_private_clock_class_set_is_absolute(
+extern void bt_private_clock_class_set_is_absolute(
                struct bt_private_clock_class *clock_class,
                bt_bool is_absolute);
 
-extern int bt_private_clock_class_set_uuid(
+extern void bt_private_clock_class_set_uuid(
                struct bt_private_clock_class *clock_class, bt_uuid uuid);
 
 #ifdef __cplusplus
index 9f48ff9690d3ab9fbeb58e9ea251b62630c7602a..16262456e99b7ae71acd16839ed2f7fbd3c3d22b 100644 (file)
@@ -61,7 +61,7 @@ bt_private_event_class_borrow_stream_class(
 extern int bt_private_event_class_set_name(
                struct bt_private_event_class *event_class, const char *name);
 
-extern int bt_private_event_class_set_log_level(
+extern void bt_private_event_class_set_log_level(
                struct bt_private_event_class *event_class,
                enum bt_event_class_log_level log_level);
 
index c7781d18344cd888ec0cb7120d4bbabede407e0f..1bb86491bb1501c1807d5696aed3704f77825eb6 100644 (file)
@@ -72,7 +72,7 @@ bt_private_event_borrow_specific_context_field(
 extern struct bt_private_field *bt_private_event_borrow_payload_field(
                struct bt_private_event *event);
 
-extern int bt_private_event_set_default_clock_value(
+extern void bt_private_event_set_default_clock_value(
                struct bt_private_event *event, uint64_t value_cycles);
 
 #ifdef __cplusplus
index 2f51a944f99bd29231fdba5f61efc46dcf860288..6c6c56a22b69addb8e7e2d0e2c96ffbce9ba8c3d 100644 (file)
@@ -60,16 +60,16 @@ bt_private_field_class_unsigned_integer_create(void);
 extern struct bt_private_field_class *
 bt_private_field_class_signed_integer_create(void);
 
-extern int bt_private_field_class_integer_set_field_value_range(
+extern void bt_private_field_class_integer_set_field_value_range(
                struct bt_private_field_class *field_class, uint64_t size);
 
-extern int bt_private_field_class_integer_set_preferred_display_base(
+extern void bt_private_field_class_integer_set_preferred_display_base(
                struct bt_private_field_class *field_class,
                enum bt_field_class_integer_preferred_display_base base);
 
 extern struct bt_private_field_class *bt_private_field_class_real_create(void);
 
-extern int bt_private_field_class_real_set_is_single_precision(
+extern void bt_private_field_class_real_set_is_single_precision(
                struct bt_private_field_class *field_class,
                bt_bool is_single_precision);
 
index 9e30ce90c9520fc0783b6f901ec8c831d7917534..fa1c103de105b4410316dde195ecc5429c5ca660 100644 (file)
@@ -70,19 +70,19 @@ int bt_private_packet_move_context_field(
                struct bt_private_packet_context_field *context);
 
 extern
-int bt_private_packet_set_default_beginning_clock_value(
+void bt_private_packet_set_default_beginning_clock_value(
                struct bt_private_packet *packet, uint64_t value_cycles);
 
 extern
-int bt_private_packet_set_default_end_clock_value(
+void bt_private_packet_set_default_end_clock_value(
                struct bt_private_packet *packet, uint64_t value_cycles);
 
 extern
-int bt_private_packet_set_discarded_event_counter_snapshot(
+void bt_private_packet_set_discarded_event_counter_snapshot(
                struct bt_private_packet *packet, uint64_t value);
 
 extern
-int bt_private_packet_set_packet_counter_snapshot(
+void bt_private_packet_set_packet_counter_snapshot(
                struct bt_private_packet *packet, uint64_t value);
 
 #ifdef __cplusplus
index ab956d453312c35058642ed40c4c5a7f4ab114f2..1f34a7e61eea63f90406edbd954fa6e82a674e1b 100644 (file)
@@ -63,10 +63,10 @@ extern int bt_private_stream_class_set_name(
                struct bt_private_stream_class *stream_class,
                const char *name);
 
-extern int bt_private_stream_class_set_assigns_automatic_event_class_id(
+extern void bt_private_stream_class_set_assigns_automatic_event_class_id(
                struct bt_private_stream_class *stream_class, bt_bool value);
 
-extern int bt_private_stream_class_set_assigns_automatic_stream_id(
+extern void bt_private_stream_class_set_assigns_automatic_stream_id(
                struct bt_private_stream_class *stream_class, bt_bool value);
 
 extern struct bt_private_field_class *
@@ -109,19 +109,19 @@ extern int bt_private_stream_class_set_default_clock_class(
 extern bt_bool bt_private_stream_class_default_clock_is_always_known(
                struct bt_private_stream_class *stream_class);
 
-extern int
+extern void
 bt_private_stream_class_set_packets_have_discarded_event_counter_snapshot(
                struct bt_private_stream_class *stream_class, bt_bool value);
 
-extern int
+extern void
 bt_private_stream_class_set_packets_have_packet_counter_snapshot(
                struct bt_private_stream_class *stream_class, bt_bool value);
 
-extern int
+extern void
 bt_private_stream_class_set_packets_have_default_beginning_clock_value(
                struct bt_private_stream_class *stream_class, bt_bool value);
 
-extern int
+extern void
 bt_private_stream_class_set_packets_have_default_end_clock_value(
                struct bt_private_stream_class *stream_class, bt_bool value);
 
index c771ad74dcc237e801c9bab24c68680e20d96ef7..a121a3e9214e51974b4342ad551164b276775061 100644 (file)
@@ -60,13 +60,13 @@ struct bt_trace *bt_private_trace_borrow_trace(
 
 extern struct bt_private_trace *bt_private_trace_create(void);
 
-extern int bt_private_trace_set_assigns_automatic_stream_class_id(
+extern void bt_private_trace_set_assigns_automatic_stream_class_id(
                struct bt_private_trace *trace, bt_bool value);
 
 extern int bt_private_trace_set_name(struct bt_private_trace *trace,
                const char *name);
 
-extern int bt_private_trace_set_uuid(struct bt_private_trace *trace,
+extern void bt_private_trace_set_uuid(struct bt_private_trace *trace,
                bt_uuid uuid);
 
 extern void bt_private_trace_borrow_environment_entry_by_index(
index 2472cba1fa7ca657eedbc55e2c5d78d724338f84..46adbd8f2257da90613f812b365b6fe519d5d720 100644 (file)
@@ -86,7 +86,7 @@ end:
        return (void *) ret_notif;
 }
 
-int bt_private_notification_inactivity_set_default_clock_value(
+void bt_private_notification_inactivity_set_default_clock_value(
                struct bt_private_notification *priv_notif,
                uint64_t value_cycles)
 {
@@ -99,7 +99,6 @@ int bt_private_notification_inactivity_set_default_clock_value(
        bt_clock_value_set_value_inline(inactivity->default_cv, value_cycles);
        BT_LIB_LOGV("Set inactivity notification's default clock value: "
                "%![notif-]+n, value=%" PRIu64, notif, value_cycles);
-       return 0;
 }
 
 struct bt_clock_value *bt_notification_inactivity_borrow_default_clock_value(
index 0e3a13d3c8cb6ec84b4c9bd3d044f8c5ad8d99d6..f24194d81efea23f84488ca9f66cf02dd2d0868f 100644 (file)
@@ -108,11 +108,10 @@ struct bt_private_stream *bt_private_notification_stream_end_borrow_stream(
                (void *) notification);
 }
 
-int bt_private_notification_stream_end_set_default_clock_value(
+void bt_private_notification_stream_end_set_default_clock_value(
                struct bt_private_notification *priv_notif,
                uint64_t value_cycles)
 {
-       int ret = 0;
        struct bt_notification *notif = (void *) priv_notif;
        struct bt_notification_stream_end *se_notif = (void *) notif;
 
@@ -123,21 +122,13 @@ int bt_private_notification_stream_end_set_default_clock_value(
                "Notification's stream class has no default clock class: "
                "%![notif-]+n, %![sc-]+S", notif, se_notif->stream->class);
 
-       if (!se_notif->default_cv) {
-               se_notif->default_cv = bt_clock_value_create(
-                       se_notif->stream->class->default_clock_class);
-               if (!se_notif->default_cv) {
-                       ret = -1;
-                       goto end;
-               }
-       }
-
+       /* TODO: have the object already created */
+       se_notif->default_cv = bt_clock_value_create(
+               se_notif->stream->class->default_clock_class);
+       BT_ASSERT(se_notif->default_cv);
        bt_clock_value_set_value_inline(se_notif->default_cv, value_cycles);
        BT_LIB_LOGV("Set notification's default clock value: %![notif-]+n, "
                "value=%" PRIu64, value_cycles);
-
-end:
-       return ret;
 }
 
 struct bt_clock_value *bt_notification_stream_end_borrow_default_clock_value(
@@ -221,11 +212,10 @@ struct bt_private_stream *bt_private_notification_stream_begin_borrow_stream(
                (void *) notification);
 }
 
-int bt_private_notification_stream_begin_set_default_clock_value(
+void bt_private_notification_stream_begin_set_default_clock_value(
                struct bt_private_notification *priv_notif,
                uint64_t value_cycles)
 {
-       int ret = 0;
        struct bt_notification *notif = (void *) priv_notif;
        struct bt_notification_stream_begin *sb_notif = (void *) notif;
 
@@ -236,21 +226,13 @@ int bt_private_notification_stream_begin_set_default_clock_value(
                "Notification's stream class has no default clock class: "
                "%![notif-]+n, %![sc-]+S", notif, sb_notif->stream->class);
 
-       if (!sb_notif->default_cv) {
-               sb_notif->default_cv = bt_clock_value_create(
-                       sb_notif->stream->class->default_clock_class);
-               if (!sb_notif->default_cv) {
-                       ret = -1;
-                       goto end;
-               }
-       }
-
+       /* TODO: have the object already created */
+       sb_notif->default_cv = bt_clock_value_create(
+               sb_notif->stream->class->default_clock_class);
+       BT_ASSERT(sb_notif->default_cv);
        bt_clock_value_set_value_inline(sb_notif->default_cv, value_cycles);
        BT_LIB_LOGV("Set notification's default clock value: %![notif-]+n, "
                "value=%" PRIu64, value_cycles);
-
-end:
-       return ret;
 }
 
 struct bt_clock_value *bt_notification_stream_begin_borrow_default_clock_value(
index 2af178da98b3dac61fc06051c242832c7d2dedc0..d268ec3f560d15f9bb609ddaf10bc71eed59037b 100644 (file)
@@ -202,7 +202,7 @@ uint64_t bt_clock_class_get_frequency(struct bt_clock_class *clock_class)
        return clock_class->frequency;
 }
 
-int bt_private_clock_class_set_frequency(
+void bt_private_clock_class_set_frequency(
                struct bt_private_clock_class *priv_clock_class,
                uint64_t frequency)
 {
@@ -219,7 +219,6 @@ int bt_private_clock_class_set_frequency(
        clock_class->frequency = frequency;
        set_base_offset(clock_class);
        BT_LIB_LOGV("Set clock class's frequency: %!+K", clock_class);
-       return 0;
 }
 
 uint64_t bt_clock_class_get_precision(struct bt_clock_class *clock_class)
@@ -228,7 +227,7 @@ uint64_t bt_clock_class_get_precision(struct bt_clock_class *clock_class)
        return clock_class->precision;
 }
 
-int bt_private_clock_class_set_precision(
+void bt_private_clock_class_set_precision(
                struct bt_private_clock_class *priv_clock_class,
                uint64_t precision)
 {
@@ -241,7 +240,6 @@ int bt_private_clock_class_set_precision(
                clock_class, precision);
        clock_class->precision = precision;
        BT_LIB_LOGV("Set clock class's precision: %!+K", clock_class);
-       return 0;
 }
 
 void bt_clock_class_get_offset(struct bt_clock_class *clock_class,
@@ -254,7 +252,7 @@ void bt_clock_class_get_offset(struct bt_clock_class *clock_class,
        *cycles = clock_class->offset_cycles;
 }
 
-int bt_private_clock_class_set_offset(
+void bt_private_clock_class_set_offset(
                struct bt_private_clock_class *priv_clock_class,
                int64_t seconds, uint64_t cycles)
 {
@@ -269,7 +267,6 @@ int bt_private_clock_class_set_offset(
        clock_class->offset_cycles = cycles;
        set_base_offset(clock_class);
        BT_LIB_LOGV("Set clock class's offset: %!+K", clock_class);
-       return 0;
 }
 
 bt_bool bt_clock_class_is_absolute(struct bt_clock_class *clock_class)
@@ -278,7 +275,7 @@ bt_bool bt_clock_class_is_absolute(struct bt_clock_class *clock_class)
        return (bool) clock_class->is_absolute;
 }
 
-int bt_private_clock_class_set_is_absolute(
+void bt_private_clock_class_set_is_absolute(
                struct bt_private_clock_class *priv_clock_class,
                bt_bool is_absolute)
 {
@@ -289,7 +286,6 @@ int bt_private_clock_class_set_is_absolute(
        clock_class->is_absolute = (bool) is_absolute;
        BT_LIB_LOGV("Set clock class's absolute property: %!+K",
                clock_class);
-       return 0;
 }
 
 bt_uuid bt_clock_class_get_uuid(struct bt_clock_class *clock_class)
@@ -298,7 +294,7 @@ bt_uuid bt_clock_class_get_uuid(struct bt_clock_class *clock_class)
        return clock_class->uuid.value;
 }
 
-int bt_private_clock_class_set_uuid(
+void bt_private_clock_class_set_uuid(
                struct bt_private_clock_class *priv_clock_class,
                bt_uuid uuid)
 {
@@ -310,7 +306,6 @@ int bt_private_clock_class_set_uuid(
        memcpy(clock_class->uuid.uuid, uuid, BABELTRACE_UUID_LEN);
        clock_class->uuid.value = clock_class->uuid.uuid;
        BT_LIB_LOGV("Set clock class's UUID: %!+K", clock_class);
-       return 0;
 }
 
 BT_HIDDEN
index 8c94fbf0115b4ccdfd21ea356070d366d71588c0..15397ff657c3eb4e9a1210de9bab6f30019052a9 100644 (file)
@@ -227,7 +227,7 @@ enum bt_property_availability bt_event_class_get_log_level(
        return event_class->log_level.base.avail;
 }
 
-int bt_private_event_class_set_log_level(
+void bt_private_event_class_set_log_level(
                struct bt_private_event_class *priv_event_class,
                enum bt_event_class_log_level log_level)
 {
@@ -238,7 +238,6 @@ int bt_private_event_class_set_log_level(
        bt_property_uint_set(&event_class->log_level,
                (uint64_t) log_level);
        BT_LIB_LOGV("Set event class's log level: %!+E", event_class);
-       return 0;
 }
 
 const char *bt_event_class_get_emf_uri(struct bt_event_class *event_class)
index b596adf1e29793a93f4762f5e460a9b2035a046c..dc88ab5c1404f3aa653cae59794dda3ce9faf1ba 100644 (file)
@@ -312,7 +312,7 @@ void bt_event_destroy(struct bt_event *event)
        g_free(event);
 }
 
-int bt_private_event_set_default_clock_value(
+void bt_private_event_set_default_clock_value(
                struct bt_private_event *priv_event, uint64_t value_cycles)
 {
        struct bt_event *event = (void *) priv_event;
@@ -329,7 +329,6 @@ int bt_private_event_set_default_clock_value(
        bt_clock_value_set_value_inline(event->default_cv, value_cycles);
        BT_LIB_LOGV("Set event's default clock value: %![event-]+e, "
                "value=%" PRIu64, event, value_cycles);
-       return 0;
 }
 
 enum bt_clock_value_status bt_event_borrow_default_clock_value(
index 6013464c19d9c45d3cececd8c5e19222f50cde14..485482f83e876152db1ee000a3c962f212e7ef86 100644 (file)
@@ -137,7 +137,7 @@ bool size_is_valid_for_enumeration_field_class(struct bt_field_class *fc,
        return true;
 }
 
-int bt_private_field_class_integer_set_field_value_range(
+void bt_private_field_class_integer_set_field_value_range(
                struct bt_private_field_class *priv_fc, uint64_t size)
 {
        struct bt_field_class *fc = (void *) priv_fc;
@@ -158,7 +158,6 @@ int bt_private_field_class_integer_set_field_value_range(
                "which are outside this range: %!+F, size=%" PRIu64, fc, size);
        int_fc->range = size;
        BT_LIB_LOGV("Set integer field class's field value range: %!+F", fc);
-       return 0;
 }
 
 enum bt_field_class_integer_preferred_display_base
@@ -171,7 +170,7 @@ bt_field_class_integer_get_preferred_display_base(struct bt_field_class *fc)
        return int_fc->base;
 }
 
-int bt_private_field_class_integer_set_preferred_display_base(
+void bt_private_field_class_integer_set_preferred_display_base(
                struct bt_private_field_class *priv_fc,
                enum bt_field_class_integer_preferred_display_base base)
 {
@@ -183,7 +182,6 @@ int bt_private_field_class_integer_set_preferred_display_base(
        BT_ASSERT_PRE_FC_HOT(fc, "Field class");
        int_fc->base = base;
        BT_LIB_LOGV("Set integer field class's preferred display base: %!+F", fc);
-       return 0;
 }
 
 static
@@ -614,7 +612,7 @@ bt_bool bt_field_class_real_is_single_precision(struct bt_field_class *fc)
        return real_fc->is_single_precision;
 }
 
-int bt_private_field_class_real_set_is_single_precision(
+void bt_private_field_class_real_set_is_single_precision(
                struct bt_private_field_class *priv_fc,
                bt_bool is_single_precision)
 {
@@ -627,7 +625,6 @@ int bt_private_field_class_real_set_is_single_precision(
        real_fc->is_single_precision = (bool) is_single_precision;
        BT_LIB_LOGV("Set real field class's \"is single precision\" property: "
                "%!+F", fc);
-       return 0;
 }
 
 static
index 9503f137771c338e79fef230c53cdd0977774a23..44a06fb0f77107273233d2a8647448412ed5828f 100644 (file)
@@ -402,7 +402,7 @@ int bt_private_packet_move_context_field(
        return 0;
 }
 
-int bt_private_packet_set_default_beginning_clock_value(
+void bt_private_packet_set_default_beginning_clock_value(
                struct bt_private_packet *priv_packet,
                uint64_t value_cycles)
 {
@@ -421,10 +421,10 @@ int bt_private_packet_set_default_beginning_clock_value(
                "no default beginning clock value: %![packet-]+a, %![sc-]+S",
                packet, sc);
        BT_ASSERT(packet->default_beginning_cv);
-       bt_clock_value_set_value_inline(packet->default_beginning_cv, value_cycles);
+       bt_clock_value_set_value_inline(packet->default_beginning_cv,
+               value_cycles);
        BT_LIB_LOGV("Set packet's default beginning clock value: "
                "%![packet-]+a, value=%" PRIu64, packet, value_cycles);
-       return 0;
 }
 
 enum bt_clock_value_status bt_packet_borrow_default_beginning_clock_value(
@@ -436,7 +436,7 @@ enum bt_clock_value_status bt_packet_borrow_default_beginning_clock_value(
        return BT_CLOCK_VALUE_STATUS_KNOWN;
 }
 
-int bt_private_packet_set_default_end_clock_value(
+void bt_private_packet_set_default_end_clock_value(
                struct bt_private_packet *priv_packet,
                uint64_t value_cycles)
 {
@@ -458,7 +458,6 @@ int bt_private_packet_set_default_end_clock_value(
        bt_clock_value_set_value_inline(packet->default_end_cv, value_cycles);
        BT_LIB_LOGV("Set packet's default end clock value: "
                "%![packet-]+a, value=%" PRIu64, packet, value_cycles);
-       return 0;
 }
 
 enum bt_clock_value_status bt_packet_borrow_default_end_clock_value(
@@ -479,7 +478,7 @@ enum bt_property_availability bt_packet_get_discarded_event_counter_snapshot(
        return packet->discarded_event_counter_snapshot.base.avail;
 }
 
-int bt_private_packet_set_discarded_event_counter_snapshot(
+void bt_private_packet_set_discarded_event_counter_snapshot(
                struct bt_private_packet *priv_packet, uint64_t value)
 {
        struct bt_packet *packet = (void *) priv_packet;
@@ -490,7 +489,6 @@ int bt_private_packet_set_discarded_event_counter_snapshot(
                "Packet's stream's discarded event counter is not enabled: "
                "%![packet-]+a", packet);
        bt_property_uint_set(&packet->discarded_event_counter_snapshot, value);
-       return 0;
 }
 
 enum bt_property_availability bt_packet_get_packet_counter_snapshot(
@@ -502,7 +500,7 @@ enum bt_property_availability bt_packet_get_packet_counter_snapshot(
        return packet->packet_counter_snapshot.base.avail;
 }
 
-int bt_private_packet_set_packet_counter_snapshot(
+void bt_private_packet_set_packet_counter_snapshot(
                struct bt_private_packet *priv_packet, uint64_t value)
 {
        struct bt_packet *packet = (void *) priv_packet;
@@ -513,5 +511,4 @@ int bt_private_packet_set_packet_counter_snapshot(
                "Packet's stream's packet counter is not enabled: "
                "%![packet-]+a", packet);
        bt_property_uint_set(&packet->packet_counter_snapshot, value);
-       return 0;
 }
index 1037b825afb2f165296d22fbeabcf7d7a10f242f..d3e1e90ec834fd070da22e0ff6417ad4d428375d 100644 (file)
@@ -506,7 +506,7 @@ bt_bool bt_stream_class_assigns_automatic_event_class_id(
        return (bt_bool) stream_class->assigns_automatic_event_class_id;
 }
 
-int bt_private_stream_class_set_assigns_automatic_event_class_id(
+void bt_private_stream_class_set_assigns_automatic_event_class_id(
                struct bt_private_stream_class *priv_stream_class,
                bt_bool value)
 {
@@ -517,7 +517,6 @@ int bt_private_stream_class_set_assigns_automatic_event_class_id(
        stream_class->assigns_automatic_event_class_id = (bool) value;
        BT_LIB_LOGV("Set stream class's automatic event class ID "
                "assignment property: %!+S", stream_class);
-       return 0;
 }
 
 bt_bool bt_stream_class_assigns_automatic_stream_id(
@@ -527,7 +526,7 @@ bt_bool bt_stream_class_assigns_automatic_stream_id(
        return (bt_bool) stream_class->assigns_automatic_stream_id;
 }
 
-int bt_private_stream_class_set_assigns_automatic_stream_id(
+void bt_private_stream_class_set_assigns_automatic_stream_id(
                struct bt_private_stream_class *priv_stream_class,
                bt_bool value)
 {
@@ -538,7 +537,6 @@ int bt_private_stream_class_set_assigns_automatic_stream_id(
        stream_class->assigns_automatic_stream_id = (bool) value;
        BT_LIB_LOGV("Set stream class's automatic stream ID "
                "assignment property: %!+S", stream_class);
-       return 0;
 }
 
 bt_bool bt_stream_class_packets_have_discarded_event_counter_snapshot(
@@ -548,7 +546,7 @@ bt_bool bt_stream_class_packets_have_discarded_event_counter_snapshot(
        return (bt_bool) stream_class->packets_have_discarded_event_counter_snapshot;
 }
 
-int bt_private_stream_class_set_packets_have_discarded_event_counter_snapshot(
+void bt_private_stream_class_set_packets_have_discarded_event_counter_snapshot(
                struct bt_private_stream_class *priv_stream_class,
                bt_bool value)
 {
@@ -561,7 +559,6 @@ int bt_private_stream_class_set_packets_have_discarded_event_counter_snapshot(
        BT_LIB_LOGV("Set stream class's "
                "\"packets have discarded event counter snapshot\" property: "
                "%!+S", stream_class);
-       return 0;
 }
 
 bt_bool bt_stream_class_packets_have_packet_counter_snapshot(
@@ -571,7 +568,7 @@ bt_bool bt_stream_class_packets_have_packet_counter_snapshot(
        return (bt_bool) stream_class->packets_have_packet_counter_snapshot;
 }
 
-int bt_private_stream_class_set_packets_have_packet_counter_snapshot(
+void bt_private_stream_class_set_packets_have_packet_counter_snapshot(
                struct bt_private_stream_class *priv_stream_class,
                bt_bool value)
 {
@@ -584,7 +581,6 @@ int bt_private_stream_class_set_packets_have_packet_counter_snapshot(
        BT_LIB_LOGV("Set stream class's "
                "\"packets have packet counter snapshot\" property: "
                "%!+S", stream_class);
-       return 0;
 }
 
 bt_bool bt_stream_class_packets_have_default_beginning_clock_value(
@@ -594,7 +590,7 @@ bt_bool bt_stream_class_packets_have_default_beginning_clock_value(
        return (bt_bool) stream_class->packets_have_default_beginning_cv;
 }
 
-int bt_private_stream_class_set_packets_have_default_beginning_clock_value(
+void bt_private_stream_class_set_packets_have_default_beginning_clock_value(
                struct bt_private_stream_class *priv_stream_class,
                bt_bool value)
 {
@@ -609,7 +605,6 @@ int bt_private_stream_class_set_packets_have_default_beginning_clock_value(
        BT_LIB_LOGV("Set stream class's "
                "\"packets have default beginning clock value\" property: "
                "%!+S", stream_class);
-       return 0;
 }
 
 bt_bool bt_stream_class_packets_have_default_end_clock_value(
@@ -619,7 +614,7 @@ bt_bool bt_stream_class_packets_have_default_end_clock_value(
        return (bt_bool) stream_class->packets_have_default_end_cv;
 }
 
-int bt_private_stream_class_set_packets_have_default_end_clock_value(
+void bt_private_stream_class_set_packets_have_default_end_clock_value(
                struct bt_private_stream_class *priv_stream_class,
                bt_bool value)
 {
@@ -634,7 +629,6 @@ int bt_private_stream_class_set_packets_have_default_end_clock_value(
        BT_LIB_LOGV("Set stream class's "
                "\"packets have default end clock value\" property: "
                "%!+S", stream_class);
-       return 0;
 }
 
 bt_bool bt_stream_class_default_clock_is_always_known(
index fdb075886367deaab5dfab922fc40e29b98ae1ec..b57f2dcc1e311fb5464f3e183a8e4cdc07789497 100644 (file)
@@ -228,7 +228,8 @@ bt_uuid bt_trace_get_uuid(struct bt_trace *trace)
        return trace->uuid.value;
 }
 
-int bt_private_trace_set_uuid(struct bt_private_trace *priv_trace, bt_uuid uuid)
+void bt_private_trace_set_uuid(struct bt_private_trace *priv_trace,
+               bt_uuid uuid)
 {
        struct bt_trace *trace = (void *) priv_trace;
 
@@ -238,7 +239,6 @@ int bt_private_trace_set_uuid(struct bt_private_trace *priv_trace, bt_uuid uuid)
        memcpy(trace->uuid.uuid, uuid, BABELTRACE_UUID_LEN);
        trace->uuid.value = trace->uuid.uuid;
        BT_LIB_LOGV("Set trace's UUID: %!+t", trace);
-       return 0;
 }
 
 BT_ASSERT_FUNC
@@ -667,7 +667,7 @@ bt_bool bt_trace_assigns_automatic_stream_class_id(struct bt_trace *trace)
        return (bt_bool) trace->assigns_automatic_stream_class_id;
 }
 
-int bt_private_trace_set_assigns_automatic_stream_class_id(
+void bt_private_trace_set_assigns_automatic_stream_class_id(
                struct bt_private_trace *priv_trace, bt_bool value)
 {
        struct bt_trace *trace = (void *) priv_trace;
@@ -677,7 +677,6 @@ int bt_private_trace_set_assigns_automatic_stream_class_id(
        trace->assigns_automatic_stream_class_id = (bool) value;
        BT_LIB_LOGV("Set trace's automatic stream class ID "
                "assignment property: %!+t", trace);
-       return 0;
 }
 
 BT_HIDDEN
index 37bc36c966ac41122daee9114aeea078b72f4d8a..c11e698fedbb1ebbf889b33b0db829a035881aa5 100644 (file)
@@ -35,14 +35,10 @@ static inline
 void ctf_field_class_int_set_props(struct ctf_field_class_int *fc,
                struct bt_private_field_class *ir_fc)
 {
-       int ret;
-
-       ret = bt_private_field_class_integer_set_field_value_range(ir_fc,
+       bt_private_field_class_integer_set_field_value_range(ir_fc,
                fc->base.size);
-       BT_ASSERT(ret == 0);
-       ret = bt_private_field_class_integer_set_preferred_display_base(ir_fc,
+       bt_private_field_class_integer_set_preferred_display_base(ir_fc,
                fc->disp_base);
-       BT_ASSERT(ret == 0);
 }
 
 static inline
@@ -104,15 +100,13 @@ struct bt_private_field_class *ctf_field_class_float_to_ir(
                struct ctf_field_class_float *fc)
 {
        struct bt_private_field_class *ir_fc;
-       int ret;
 
        ir_fc = bt_private_field_class_real_create();
        BT_ASSERT(ir_fc);
 
        if (fc->base.size == 32) {
-               ret = bt_private_field_class_real_set_is_single_precision(ir_fc,
+               bt_private_field_class_real_set_is_single_precision(ir_fc,
                        BT_TRUE);
-               BT_ASSERT(ret == 0);
        }
 
        return ir_fc;
@@ -450,8 +444,7 @@ struct bt_private_event_class *ctf_event_class_to_ir(struct ctf_event_class *ec,
        }
 
        if (ec->log_level != -1) {
-               ret = bt_private_event_class_set_log_level(ir_ec, ec->log_level);
-               BT_ASSERT(ret == 0);
+               bt_private_event_class_set_log_level(ir_ec, ec->log_level);
        }
 
        ec->is_translated = true;
@@ -517,11 +510,9 @@ struct bt_private_stream_class *ctf_stream_class_to_ir(struct ctf_stream_class *
                }
        }
 
-       ret = bt_private_stream_class_set_assigns_automatic_event_class_id(ir_sc,
+       bt_private_stream_class_set_assigns_automatic_event_class_id(ir_sc,
                BT_FALSE);
-       BT_ASSERT(ret == 0);
-       ret = bt_private_stream_class_set_assigns_automatic_stream_id(ir_sc, BT_FALSE);
-       BT_ASSERT(ret == 0);
+       bt_private_stream_class_set_assigns_automatic_stream_id(ir_sc, BT_FALSE);
 
        if (sc->default_clock_class) {
                ret = bt_private_stream_class_set_default_clock_class(ir_sc,
@@ -533,9 +524,8 @@ struct bt_private_stream_class *ctf_stream_class_to_ir(struct ctf_stream_class *
                "events_discarded");
        if (int_fc) {
                if (int_fc->meaning == CTF_FIELD_CLASS_MEANING_DISC_EV_REC_COUNTER_SNAPSHOT) {
-                       ret = bt_private_stream_class_set_packets_have_discarded_event_counter_snapshot(
+                       bt_private_stream_class_set_packets_have_discarded_event_counter_snapshot(
                                ir_sc, BT_TRUE);
-                       BT_ASSERT(ret == 0);
                }
        }
 
@@ -543,9 +533,8 @@ struct bt_private_stream_class *ctf_stream_class_to_ir(struct ctf_stream_class *
                "packet_seq_num");
        if (int_fc) {
                if (int_fc->meaning == CTF_FIELD_CLASS_MEANING_PACKET_COUNTER_SNAPSHOT) {
-                       ret = bt_private_stream_class_set_packets_have_packet_counter_snapshot(
+                       bt_private_stream_class_set_packets_have_packet_counter_snapshot(
                                ir_sc, BT_TRUE);
-                       BT_ASSERT(ret == 0);
                }
        }
 
@@ -553,9 +542,8 @@ struct bt_private_stream_class *ctf_stream_class_to_ir(struct ctf_stream_class *
                "timestamp_begin");
        if (int_fc) {
                if (int_fc->meaning == CTF_FIELD_CLASS_MEANING_PACKET_BEGINNING_TIME) {
-                       ret = bt_private_stream_class_set_packets_have_default_beginning_clock_value(
+                       bt_private_stream_class_set_packets_have_default_beginning_clock_value(
                                ir_sc, BT_TRUE);
-                       BT_ASSERT(ret == 0);
                }
        }
 
@@ -563,9 +551,8 @@ struct bt_private_stream_class *ctf_stream_class_to_ir(struct ctf_stream_class *
                "timestamp_end");
        if (int_fc) {
                if (int_fc->meaning == CTF_FIELD_CLASS_MEANING_PACKET_END_TIME) {
-                       ret = bt_private_stream_class_set_packets_have_default_end_clock_value(
+                       bt_private_stream_class_set_packets_have_default_end_clock_value(
                                ir_sc, BT_TRUE);
-                       BT_ASSERT(ret == 0);
                }
        }
 
@@ -607,10 +594,7 @@ int ctf_trace_class_to_ir(struct bt_private_trace *ir_trace,
        }
 
        if (tc->is_uuid_set) {
-               ret = bt_private_trace_set_uuid(ir_trace, tc->uuid);
-               if (ret) {
-                       goto end;
-               }
+               bt_private_trace_set_uuid(ir_trace, tc->uuid);
        }
 
        for (i = 0; i < tc->env_entries->len; i++) {
@@ -637,12 +621,8 @@ int ctf_trace_class_to_ir(struct bt_private_trace *ir_trace,
                }
        }
 
-       ret = bt_private_trace_set_assigns_automatic_stream_class_id(ir_trace,
+       bt_private_trace_set_assigns_automatic_stream_class_id(ir_trace,
                BT_FALSE);
-       if (ret) {
-               goto end;
-       }
-
        tc->is_translated = true;
        tc->ir_tc = ir_trace;
 
index ec1f22c3fdc7e22afcb20a0e6ee412c885e7429b..dacef267a8371dee8fc6284c2abeb04a4deda475 100644 (file)
@@ -3606,9 +3606,8 @@ int auto_map_field_to_trace_clock_class(struct ctx *ctx,
                 */
                clock_class_to_map_to = bt_private_clock_class_create();
                BT_ASSERT(clock_class_to_map_to);
-               ret = bt_private_clock_class_set_frequency(clock_class_to_map_to,
+               bt_private_clock_class_set_frequency(clock_class_to_map_to,
                        UINT64_C(1000000000));
-               BT_ASSERT(ret == 0);
                ret = bt_private_clock_class_set_name(clock_class_to_map_to,
                        "default");
                BT_ASSERT(ret == 0);
@@ -4433,13 +4432,7 @@ int visit_clock_decl_entry(struct ctx *ctx, struct ctf_node *entry_node,
                        goto error;
                }
 
-               ret = bt_private_clock_class_set_uuid(clock, uuid);
-               if (ret) {
-                       _BT_LOGE_NODE(entry_node,
-                               "Cannot set clock class's UUID.");
-                       goto error;
-               }
-
+               bt_private_clock_class_set_uuid(clock, uuid);
                _SET(set, _CLOCK_UUID_SET);
        } else if (!strcmp(left, "description")) {
                char *right;
@@ -4496,13 +4489,7 @@ int visit_clock_decl_entry(struct ctx *ctx, struct ctf_node *entry_node,
                        goto error;
                }
 
-               ret = bt_private_clock_class_set_frequency(clock, freq);
-               if (ret) {
-                       _BT_LOGE_NODE(entry_node,
-                               "Cannot set clock class's frequency.");
-                       goto error;
-               }
-
+               bt_private_clock_class_set_frequency(clock, freq);
                _SET(set, _CLOCK_FREQ_SET);
        } else if (!strcmp(left, "precision")) {
                uint64_t precision;
@@ -4523,13 +4510,7 @@ int visit_clock_decl_entry(struct ctx *ctx, struct ctf_node *entry_node,
                        goto error;
                }
 
-               ret = bt_private_clock_class_set_precision(clock, precision);
-               if (ret) {
-                       _BT_LOGE_NODE(entry_node,
-                               "Cannot set clock class's precision.");
-                       goto error;
-               }
-
+               bt_private_clock_class_set_precision(clock, precision);
                _SET(set, _CLOCK_PRECISION_SET);
        } else if (!strcmp(left, "offset_s")) {
                if (_IS_SET(set, _CLOCK_OFFSET_S_SET)) {
@@ -4587,13 +4568,7 @@ int visit_clock_decl_entry(struct ctx *ctx, struct ctf_node *entry_node,
                        goto error;
                }
 
-               ret = bt_private_clock_class_set_is_absolute(clock, ret);
-               if (ret) {
-                       _BT_LOGE_NODE(entry_node,
-                               "Cannot set clock class's absolute flag.");
-                       goto error;
-               }
-
+               bt_private_clock_class_set_is_absolute(clock, ret);
                _SET(set, _CLOCK_ABSOLUTE_SET);
        } else {
                _BT_LOGW_NODE(entry_node,
@@ -4641,7 +4616,6 @@ static
 void apply_clock_class_offset(struct ctx *ctx,
                struct bt_private_clock_class *clock)
 {
-       int ret;
        uint64_t freq;
        int64_t offset_s_to_apply = ctx->decoder_config.clock_class_offset_s;
        uint64_t offset_ns_to_apply;
@@ -4691,8 +4665,7 @@ void apply_clock_class_offset(struct ctx *ctx,
        calibrate_clock_class_offsets(&cur_offset_s, &cur_offset_cycles, freq);
 
        /* Set final offsets */
-       ret = bt_private_clock_class_set_offset(clock, cur_offset_s, cur_offset_cycles);
-       BT_ASSERT(ret == 0);
+       bt_private_clock_class_set_offset(clock, cur_offset_s, cur_offset_cycles);
 
 end:
        return;
@@ -4727,12 +4700,7 @@ int visit_clock_decl(struct ctx *ctx, struct ctf_node *clock_node)
        }
 
        /* CTF: not absolute by default */
-       ret = bt_private_clock_class_set_is_absolute(clock, BT_FALSE);
-       if (ret) {
-               _BT_LOGE_NODE(clock_node,
-                       "Cannot set clock class's absolute flag.");
-               goto end;
-       }
+       bt_private_clock_class_set_is_absolute(clock, BT_FALSE);
 
        bt_list_for_each_entry(entry_node, decl_list, siblings) {
                ret = visit_clock_decl_entry(ctx, entry_node, clock, &set,
@@ -4762,12 +4730,7 @@ int visit_clock_decl(struct ctx *ctx, struct ctf_node *clock_node)
                 * it's a condition to be able to sort notifications
                 * from different sources.
                 */
-               ret = bt_private_clock_class_set_is_absolute(clock, BT_TRUE);
-               if (ret) {
-                       _BT_LOGE_NODE(clock_node,
-                               "Cannot set clock class's absolute flag.");
-                       goto end;
-               }
+               bt_private_clock_class_set_is_absolute(clock, BT_TRUE);
        }
 
        /*
@@ -4779,8 +4742,7 @@ int visit_clock_decl(struct ctx *ctx, struct ctf_node *clock_node)
        calibrate_clock_class_offsets(&offset_seconds, &offset_cycles, freq);
        BT_ASSERT(offset_cycles < bt_clock_class_get_frequency(
                bt_private_clock_class_borrow_clock_class(clock)));
-       ret = bt_private_clock_class_set_offset(clock, offset_seconds, offset_cycles);
-       BT_ASSERT(ret == 0);
+       bt_private_clock_class_set_offset(clock, offset_seconds, offset_cycles);
        apply_clock_class_offset(ctx, clock);
        g_ptr_array_add(ctx->ctf_tc->clock_classes, bt_object_get_ref(clock));
 
index 33808b8e3341251c57d5ae51e1249cd15a65994c..259bb5cdc5f4d6b11c85403edaa04cff865390c1 100644 (file)
@@ -2273,10 +2273,8 @@ void set_event_default_clock_value(struct bt_notif_iter *notit)
        BT_ASSERT(event);
 
        if (bt_stream_class_borrow_default_clock_class(sc)) {
-               int ret = bt_private_event_set_default_clock_value(event,
+               bt_private_event_set_default_clock_value(event,
                        notit->default_clock_val);
-
-               BT_ASSERT(ret == 0);
        }
 }
 
@@ -2352,30 +2350,26 @@ void notify_new_packet(struct bt_notif_iter *notit,
 
        if (bt_stream_class_packets_have_discarded_event_counter_snapshot(sc)) {
                BT_ASSERT(notit->snapshots.discarded_events != UINT64_C(-1));
-               ret = bt_private_packet_set_discarded_event_counter_snapshot(
+               bt_private_packet_set_discarded_event_counter_snapshot(
                        notit->packet, notit->snapshots.discarded_events);
-               BT_ASSERT(ret == 0);
        }
 
        if (bt_stream_class_packets_have_packet_counter_snapshot(sc)) {
                BT_ASSERT(notit->snapshots.packets != UINT64_C(-1));
-               ret = bt_private_packet_set_packet_counter_snapshot(
+               bt_private_packet_set_packet_counter_snapshot(
                        notit->packet, notit->snapshots.packets);
-               BT_ASSERT(ret == 0);
        }
 
        if (bt_stream_class_packets_have_default_beginning_clock_value(sc)) {
                BT_ASSERT(notit->snapshots.beginning_clock != UINT64_C(-1));
-               ret = bt_private_packet_set_default_beginning_clock_value(
+               bt_private_packet_set_default_beginning_clock_value(
                        notit->packet, notit->snapshots.beginning_clock);
-               BT_ASSERT(ret == 0);
        }
 
        if (bt_stream_class_packets_have_default_end_clock_value(sc)) {
                BT_ASSERT(notit->snapshots.end_clock != UINT64_C(-1));
-               ret = bt_private_packet_set_default_end_clock_value(
+               bt_private_packet_set_default_end_clock_value(
                        notit->packet, notit->snapshots.end_clock);
-               BT_ASSERT(ret == 0);
        }
 
        if (notit->packet_header_field) {
index 36efc583ed6a886e78dd93c8b5ed9ba583455403..c3fa11452764ad98b8454e426fa07be4ef90f41e 100644 (file)
@@ -511,8 +511,7 @@ skip_ts:
        BT_ASSERT(event);
 
        if (dmesg_comp->clock_class) {
-               ret = bt_private_event_set_default_clock_value(event, ts);
-               BT_ASSERT(ret == 0);
+               bt_private_event_set_default_clock_value(event, ts);
        }
 
        goto end;
index 9191890e73584d582bca1e80dd5f8314087f198e..380fbe562ca855ef4759caea40552865cef7d51e 100644 (file)
@@ -73,22 +73,19 @@ static struct bt_private_field_class *create_integer_struct(void)
        BT_ASSERT(structure);
        ui8 = bt_private_field_class_unsigned_integer_create();
        BT_ASSERT(ui8);
-       ret = bt_private_field_class_integer_set_field_value_range(ui8, 8);
-       BT_ASSERT(ret == 0);
+       bt_private_field_class_integer_set_field_value_range(ui8, 8);
        ret = bt_private_field_class_structure_append_member(structure,
                "payload_8", ui8);
        BT_ASSERT(ret == 0);
        ui16 = bt_private_field_class_unsigned_integer_create();
        BT_ASSERT(ui16);
-       ret = bt_private_field_class_integer_set_field_value_range(ui16, 16);
-       BT_ASSERT(ret == 0);
+       bt_private_field_class_integer_set_field_value_range(ui16, 16);
        ret = bt_private_field_class_structure_append_member(structure,
                "payload_16", ui16);
        BT_ASSERT(ret == 0);
        ui32 = bt_private_field_class_unsigned_integer_create();
        BT_ASSERT(ui32);
-       ret = bt_private_field_class_integer_set_field_value_range(ui32, 32);
-       BT_ASSERT(ret == 0);
+       bt_private_field_class_integer_set_field_value_range(ui32, 32);
        ret = bt_private_field_class_structure_append_member(structure,
                "payload_32", ui32);
        BT_ASSERT(ret == 0);
@@ -202,16 +199,14 @@ static void set_stream_class_field_classes(
        BT_ASSERT(packet_context_type);
        fc = bt_private_field_class_unsigned_integer_create();
        BT_ASSERT(fc);
-       ret = bt_private_field_class_integer_set_field_value_range(fc, 32);
-       BT_ASSERT(ret == 0);
+       bt_private_field_class_integer_set_field_value_range(fc, 32);
        ret = bt_private_field_class_structure_append_member(packet_context_type,
                "packet_size", fc);
        BT_ASSERT(ret == 0);
        bt_object_put_ref(fc);
        fc = bt_private_field_class_unsigned_integer_create();
        BT_ASSERT(fc);
-       ret = bt_private_field_class_integer_set_field_value_range(fc, 32);
-       BT_ASSERT(ret == 0);
+       bt_private_field_class_integer_set_field_value_range(fc, 32);
        ret = bt_private_field_class_structure_append_member(packet_context_type,
                "content_size", fc);
        BT_ASSERT(ret == 0);
@@ -220,8 +215,7 @@ static void set_stream_class_field_classes(
        BT_ASSERT(event_header_type);
        fc = bt_private_field_class_unsigned_integer_create();
        BT_ASSERT(fc);
-       ret = bt_private_field_class_integer_set_field_value_range(fc, 32);
-       BT_ASSERT(ret == 0);
+       bt_private_field_class_integer_set_field_value_range(fc, 32);
        ret = bt_private_field_class_structure_append_member(event_header_type,
                "id", fc);
        BT_ASSERT(ret == 0);
@@ -288,8 +282,7 @@ static void set_trace_packet_header(struct bt_private_trace *trace)
        BT_ASSERT(packet_header_type);
        fc = bt_private_field_class_unsigned_integer_create();
        BT_ASSERT(fc);
-       ret = bt_private_field_class_integer_set_field_value_range(fc, 32);
-       BT_ASSERT(ret == 0);
+       bt_private_field_class_integer_set_field_value_range(fc, 32);
        ret = bt_private_field_class_structure_append_member(packet_header_type,
                "stream_id", fc);
        BT_ASSERT(ret == 0);
This page took 0.044888 seconds and 4 git commands to generate.