Daemon: simplify nested "if"
This commit is contained in:
parent
0b1ad27ba8
commit
20ffedc745
@ -106,11 +106,10 @@ daemonize_set_user(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* set gid */
|
/* set gid */
|
||||||
if (user_gid != (gid_t)-1 && user_gid != getgid()) {
|
if (user_gid != (gid_t)-1 && user_gid != getgid() &&
|
||||||
if (setgid(user_gid) == -1) {
|
setgid(user_gid) == -1) {
|
||||||
FormatFatalSystemError("Failed to set group %d",
|
FormatFatalSystemError("Failed to set group %d",
|
||||||
(int)user_gid);
|
(int)user_gid);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef _BSD_SOURCE
|
||||||
|
Loading…
Reference in New Issue
Block a user