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 23:34:42 +0000 (00:34 +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 9f0bcdc41e8ad0788f5ac841ddabd12de8363d2f..3c2d2a756b71b704666b3d5b81792d9c02c50708 100644 (file)
@@ -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) {
This page took 0.028053 seconds and 4 git commands to generate.