From: Mathieu Desnoyers Date: Sat, 2 Nov 2013 02:52:06 +0000 (-0400) Subject: Fix ctf writer lints X-Git-Tag: v1.2.0-rc1~39^2~24 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=9bb7e58bfe41af1643764efa03c91cef5d841661 Fix ctf writer lints Coverity found: **CHECKED_RETURN formats/ctf/writer/writer.c **bt_ctf_writer_destroy() **CHECKED_RETURN formats/ctf/writer/stream.c **bt_ctf_stream_destroy() Signed-off-by: Mathieu Desnoyers --- diff --git a/formats/ctf/writer/writer.c b/formats/ctf/writer/writer.c index 8529a1e3..75bf850c 100644 --- a/formats/ctf/writer/writer.c +++ b/formats/ctf/writer/writer.c @@ -168,11 +168,17 @@ void bt_ctf_writer_destroy(struct bt_ctf_ref *ref) } if (writer->trace_dir_fd > 0) { - close(writer->trace_dir_fd); + if (close(writer->trace_dir_fd)) { + perror("close"); + abort(); + } } if (writer->metadata_fd > 0) { - close(writer->metadata_fd); + if (close(writer->metadata_fd)) { + perror("close"); + abort(); + } } if (writer->environment) {