From: Jonathan Rajotte Date: Tue, 28 Jul 2020 14:22:28 +0000 (-0400) Subject: Fix: common: unchecked return value X-Git-Tag: v2.13.0-rc1~558 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=035cc184d874059a4155c86edd3f5d807886edd2;p=lttng-tools.git Fix: common: unchecked return value 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 Signed-off-by: Jérémie Galarneau Change-Id: I45c1054de7252aab4b77f330102ff4f489f20a6d --- diff --git a/src/common/payload.c b/src/common/payload.c index 70b2c7e5a..5567806d2 100644 --- a/src/common/payload.c +++ b/src/common/payload.c @@ -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); }