Add out-of-bound checks
[babeltrace.git] / formats / ctf-text / types / float.c
index e96b4dd596f8fa75d71407d53451cc1807835d3b..1f52cb078765a3c7389e1679e658b226d7024dad 100644 (file)
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-void ctf_text_float_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_text_float_write(struct stream_pos *ppos, struct definition *definition)
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
 
        if (pos->dummy)
-               return;
+               return 0;
        print_pos_tabs(pos);
        fprintf(pos->fp, "%Lg\n", float_definition->value);
+       return 0;
 }
This page took 0.02304 seconds and 4 git commands to generate.