From db58870b8a78ae1a466949318f1a7c9ef1ba3b3e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 30 Nov 2017 23:45:30 +0100 Subject: [PATCH] Fix: unknown consumer type considered a libc error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The PERROR() macro uses the errno variable to print an error message. However, the consumer type being invalid is an internal error. The value of errno, at that point, is unrelated to the error. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 9f0bcdc41..3c2d2a756 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -2623,7 +2623,7 @@ static pid_t spawn_consumerd(struct consumer_data *consumer_data) break; } default: - PERROR("unknown consumer type"); + ERR("unknown consumer type"); exit(EXIT_FAILURE); } if (errno != 0) { -- 2.34.1