From: Mathieu Desnoyers Date: Thu, 23 Feb 2012 15:41:45 +0000 (-0500) Subject: fix: if tracing group does not exist, do not report a client error X-Git-Tag: v2.0.0-rc3~31 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b4d8603b75b780fd3b598ba9347bdfade6132ea5;p=lttng-tools.git fix: if tracing group does not exist, do not report a client error Signed-off-by: Mathieu Desnoyers --- 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; }