From: Jérémie Galarneau Date: Fri, 5 Oct 2018 16:06:37 +0000 (-0400) Subject: Remove unnecessary check of output parameter X-Git-Tag: v2.11.0-rc2~200 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d12522c8f767df18a4fa4af0df379e09aea26e6f;p=lttng-tools.git Remove unnecessary check of output parameter It is not necessary to check for `_notification != NULL` as it is done at the beginning of the function. Moreover, it confuses Coverity which warns that `notification` will be leaked if the output parameter is NULL. Signed-off-by: Jérémie Galarneau --- diff --git a/src/lib/lttng-ctl/channel.c b/src/lib/lttng-ctl/channel.c index 5487d051b..5271aa13f 100644 --- a/src/lib/lttng-ctl/channel.c +++ b/src/lib/lttng-ctl/channel.c @@ -289,10 +289,8 @@ lttng_notification_channel_get_next_notification( end_unlock: pthread_mutex_unlock(&channel->lock); + *_notification = notification; end: - if (_notification) { - *_notification = notification; - } return status; }