From: Fabian Keil Date: Mon, 23 Jul 2012 12:40:52 +0000 (+0000) Subject: Merge two if conditions in main() X-Git-Tag: v_3_0_20~316 X-Git-Url: http://www.privoxy.org/gitweb/-?a=commitdiff_plain;h=e1ea3c13118134b0404a4f54a47e813794531b8d;p=privoxy.git Merge two if conditions in main() --- diff --git a/jcc.c b/jcc.c index f2fa2cfc..0aea9644 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.379 2012/07/23 12:39:12 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.380 2012/07/23 12:39:42 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -3198,12 +3198,9 @@ int main(int argc, char **argv) { log_error(LOG_LEVEL_FATAL, "Cannot setgid(): Insufficient permissions."); } - if (NULL != grp) + if ((NULL != grp) && setgroups(1, &grp->gr_gid)) { - if (setgroups(1, &grp->gr_gid)) - { - log_error(LOG_LEVEL_FATAL, "setgroups() failed: %E"); - } + log_error(LOG_LEVEL_FATAL, "setgroups() failed: %E"); } else if (initgroups(pw->pw_name, pw->pw_gid)) {