From e66c1d2c3e5dd979cab6afb4e5de525c60e18617 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 23 Feb 2012 10:41:45 -0500 Subject: [PATCH] fix: if tracing group does not exist, do not report a client error Signed-off-by: Mathieu Desnoyers Signed-off-by: David Goulet --- src/lib/lttng-ctl/lttng-ctl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index dafe085dc..c5887fe65 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -138,11 +138,8 @@ static int check_tracing_group(const char *grp_name) /* Get GID of group 'tracing' */ grp_tracing = getgrnam(grp_name); - if (grp_tracing == NULL) { - /* NULL means not found also. getgrnam(3) */ - if (errno != 0) { - perror("getgrnam"); - } + if (!grp_tracing) { + /* If grp_tracing is NULL, the group does not exist. */ goto end; } -- 2.34.1