Fix type-limits warnings, uint can't be < 0
[babeltrace.git] / include / babeltrace / ctfser-internal.h
index 8469a04e7bef8b9f05ea5e282a0d1ff9d2278d77..3522bae02afa40ff67eb686cd8134534bac0e7e8 100644 (file)
@@ -146,8 +146,7 @@ bool _bt_ctfser_has_space_left(struct bt_ctfser *ctfser, uint64_t size_bits)
                goto end;
        }
 
-       if (unlikely(ctfser->offset_in_cur_packet_bits < 0 || size_bits >
-                       UINT64_MAX - ctfser->offset_in_cur_packet_bits)) {
+       if (unlikely(size_bits > UINT64_MAX - ctfser->offset_in_cur_packet_bits)) {
                has_space_left = false;
                goto end;
        }
@@ -568,4 +567,10 @@ void bt_ctfser_set_offset_in_current_packet_bits(struct bt_ctfser *ctfser,
        ctfser->offset_in_cur_packet_bits = offset_bits;
 }
 
+static inline
+const char *bt_ctfser_get_file_path(struct bt_ctfser *ctfser)
+{
+       return ctfser->path->str;
+}
+
 #endif /* BABELTRACE_CTFSER_INTERNAL_H */
This page took 0.024768 seconds and 4 git commands to generate.