From bbcab087101aeaf9811074f9e622290e503104ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 23 Aug 2018 21:13:48 -0400 Subject: [PATCH] Clean-up: remove useless check of event name MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 'name' in the lttng_event structure is a fixed-size array, which will cause this condition to always evaluate to true. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 7f05655ec..c5c7564b6 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2093,8 +2093,7 @@ static int _cmd_enable_event(struct ltt_session *session, ret = validate_ust_event_name(event->name); if (ret) { WARN("Userspace event name %s failed validation.", - event->name ? - event->name : "NULL"); + event->name); ret = LTTNG_ERR_INVALID_EVENT_NAME; goto error; } -- 2.34.1