From 9bb7e58bfe41af1643764efa03c91cef5d841661 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 1 Nov 2013 22:52:06 -0400 Subject: [PATCH] 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 --- formats/ctf/writer/writer.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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) { -- 2.34.1