X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf-text%2Fctf-text.c;h=8a8e7c3c104651cfb21ac95e42fa294117a378f2;hp=cbf074e07e76db4f03bfd028803ffbdf94745081;hb=f824ae0446c7a1ef3acd5d8e30c039c4ed7381ce;hpb=d0d82191bdac8626adf2489b89279f47805282ea diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c index cbf074e0..8a8e7c3c 100644 --- a/formats/ctf-text/ctf-text.c +++ b/formats/ctf-text/ctf-text.c @@ -83,7 +83,7 @@ struct trace_descriptor *ctf_text_open_trace(const char *path, int flags, void (*packet_seek)(struct stream_pos *pos, size_t index, int whence), FILE *metadata_fp); static -void ctf_text_close_trace(struct trace_descriptor *descriptor); +int ctf_text_close_trace(struct trace_descriptor *descriptor); static rw_dispatch write_dispatch_table[] = { @@ -584,12 +584,18 @@ error: } static -void ctf_text_close_trace(struct trace_descriptor *td) +int ctf_text_close_trace(struct trace_descriptor *td) { + int ret; struct ctf_text_stream_pos *pos = container_of(td, struct ctf_text_stream_pos, trace_descriptor); - fclose(pos->fp); + ret = fclose(pos->fp); + if (ret) { + perror("Error on fclose"); + return -1; + } g_free(pos); + return 0; } static