X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.c;h=c5887fe65ead21a41f637aafa3adc10d60e0eb45;hp=dafe085dc9bc40b81f53a35b13fbc6791969492f;hb=e66c1d2c3e5dd979cab6afb4e5de525c60e18617;hpb=90755f8b59a2fe919cdf90f6f1ad89459f6b5ae2 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; }