From c7e69e8e13056f062188162bb4468d33c713f897 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 30 Jun 2017 16:37:25 +0200 Subject: [PATCH 1/1] exec plugin: remove some Yoda conditionals --- src/exec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/exec.c b/src/exec.c index 80515d93..3d12a2de 100644 --- a/src/exec.c +++ b/src/exec.c @@ -401,19 +401,19 @@ static int fork_child(program_list_t *pl, int *fd_in, int *fd_out, /* The group configured in the configfile is set as effective group, because * this way the forked process can (re-)gain the user's primary group. */ egid = -1; - if (NULL != pl->group) { - if ('\0' != *pl->group) { + if (pl->group != NULL) { + if (*pl->group != '\0') { struct group *gr_ptr = NULL; struct group gr; status = getgrnam_r(pl->group, &gr, nambuf, sizeof(nambuf), &gr_ptr); - if (0 != status) { + if (status != 0) { ERROR("exec plugin: Failed to get group information " "for group ``%s'': %s", pl->group, sstrerror(status, errbuf, sizeof(errbuf))); goto failed; } - if (NULL == gr_ptr) { + if (gr_ptr == NULL) { ERROR("exec plugin: No such group: `%s'", pl->group); goto failed; } -- 2.11.0