Add out-of-bound checks
[babeltrace.git] / formats / ctf / types / sequence.c
index 127c6588ef33fedff14362138a29a3b29c69ad88..acd4c7c0fca8310efc5bc890283525122d533fa1 100644 (file)
 
 #include <babeltrace/ctf/types.h>
 
-void ctf_sequence_begin(struct stream_pos *pos,
-                       const struct type_sequence *sequence_type)
+int ctf_sequence_rw(struct stream_pos *ppos, struct definition *definition)
 {
-       align_pos(pos, sequence_type->p.alignment);
-}
+       struct declaration *declaration = definition->declaration;
+       struct ctf_stream_pos *pos = ctf_pos(ppos);
 
-void ctf_sequence_end(struct stream_pos *pos,
-                     const struct type_sequence *sequence_type)
-{
+       ctf_align_pos(pos, declaration->alignment);
+       return sequence_rw(ppos, definition);
 }
This page took 0.023258 seconds and 4 git commands to generate.