mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-15 22:08:33 +00:00
[apr] Fix dead nested assignments
This commit is contained in:
1 parent
6ef22a6f7d
commit
d8c3595076
4 files changed
+6
-8
No files matched your search
@@ -369,7 +369,6 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
|
||||
return errno;
|
||||
}
|
||||
else if (new->pid == 0) {
|
||||
int status;
|
||||
/* child process */
|
||||
|
||||
/*
|
||||
@@ -433,7 +432,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
|
||||
|
||||
/* Only try to switch if we are running as root */
|
||||
if (attr->gid != -1 && !geteuid()) {
|
||||
if ((status = setgid(attr->gid))) {
|
||||
if (setgid(attr->gid)) {
|
||||
if (attr->errfn) {
|
||||
attr->errfn(pool, errno, "setting of group failed");
|
||||
}
|
||||
@@ -442,7 +441,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
|
||||
}
|
||||
|
||||
if (attr->uid != -1 && !geteuid()) {
|
||||
if ((status = setuid(attr->uid))) {
|
||||
if (setuid(attr->uid)) {
|
||||
if (attr->errfn) {
|
||||
attr->errfn(pool, errno, "setting of user failed");
|
||||
}
|
||||
@@ -450,7 +449,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
|
||||
}
|
||||
}
|
||||
|
||||
if ((status = limit_proc(attr)) != APR_SUCCESS) {
|
||||
if (limit_proc(attr) != APR_SUCCESS) {
|
||||
if (attr->errfn) {
|
||||
attr->errfn(pool, errno, "setting of resource limits failed");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user