Add out-of-bound checks
[babeltrace.git] / formats / ctf / types / variant.c
index 75dba56d8e5163b3f2db412b6fe6abc6b43a1e88..25c189dd5dc6f8c9314d8299033fed739432124b 100644 (file)
 
 #include <babeltrace/ctf/types.h>
 
-void ctf_variant_begin(struct stream_pos *pos,
-                      const struct declaration_variant *variant_declaration)
+int ctf_variant_rw(struct stream_pos *ppos, struct definition *definition)
 {
-}
+       struct declaration *declaration = definition->declaration;
+       struct ctf_stream_pos *pos = ctf_pos(ppos);
 
-void ctf_variant_end(struct stream_pos *pos,
-                    const struct declaration_variant *variant_declaration)
-{
+       ctf_align_pos(pos, declaration->alignment);
+       return variant_rw(ppos, definition);
 }
This page took 0.022816 seconds and 4 git commands to generate.