Fix: unchecked return value of stream flush
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 3 Aug 2017 13:49:22 +0000 (09:49 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 9 Aug 2017 21:20:39 +0000 (17:20 -0400)
Coverity:

CID 1376154 (#1 of 1): Unchecked return value (CHECKED_RETURN)1.
check_return: Calling bt_ctf_stream_flush without checking return value
(as is done elsewhere 5 out of 6 times).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/ctf/fs-sink/write.c

index 21938e6ff855849ac7035c602efac532b1345720..995d344b807d64c37cae0a0f3b6f3dee56d3a4e7 100644 (file)
@@ -66,10 +66,13 @@ gboolean empty_ht(gpointer key, gpointer value, gpointer user_data)
 static
 gboolean empty_streams_ht(gpointer key, gpointer value, gpointer user_data)
 {
+       int ret;
        struct bt_ctf_stream *writer_stream = value;
 
-       bt_ctf_stream_flush(writer_stream);
-
+       ret = bt_ctf_stream_flush(writer_stream);
+       if (ret) {
+               BT_LOGD_STR("Failed to flush stream while emptying hash table.");
+       }
        return TRUE;
 }
 
This page took 0.02483 seconds and 5 git commands to generate.