Fix: common: unchecked return value
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 28 Jul 2020 14:22:28 +0000 (10:22 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Jul 2020 16:36:09 +0000 (12:36 -0400)
From Coverity:
  CID 1431050 (#1 of 1): Unchecked return value (CHECKED_RETURN)
  1. check_return: Calling lttng_dynamic_buffer_set_size without
     checking return value (as is done elsewhere 32 out of 40 times).

Solution
========

Since we are inside a the clear operation for the payload, ignore the
return value.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I45c1054de7252aab4b77f330102ff4f489f20a6d

src/common/payload.c

index 70b2c7e5acccbd03f6e0b66ce2a8b9cb687d946a..5567806d2df3647bcecf7396a5a33ae7dc55868e 100644 (file)
@@ -80,7 +80,7 @@ void lttng_payload_reset(struct lttng_payload *payload)
 LTTNG_HIDDEN
 void lttng_payload_clear(struct lttng_payload *payload)
 {
-       lttng_dynamic_buffer_set_size(&payload->buffer, 0);
+       (void) lttng_dynamic_buffer_set_size(&payload->buffer, 0);
        lttng_dynamic_pointer_array_clear(&payload->_fd_handles);
 }
 
This page took 0.025467 seconds and 4 git commands to generate.