Fix: unknown consumer type considered a libc error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Nov 2017 22:45:30 +0000 (23:45 +0100)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Nov 2017 22:53:12 +0000 (23:53 +0100)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c

index 1eaf9bef330ff62a74b9665c88fc490824d94728..6113f49ade90cea6e02e7a4c74c296fa82acdbc1 100644 (file)
@@ -2521,7 +2521,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) {
This page took 0.02725 seconds and 4 git commands to generate.