summaryrefslogtreecommitdiff
path: root/threadproc/beos
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2010-07-27 22:09:45 +0000
committerStefan Fritsch <sf@apache.org>2010-07-27 22:09:45 +0000
commit443247b17081cb00b0e7f2f688889417cb45871f (patch)
tree1cb6ddc24a0845e85f254eec9056103e26b73d0b /threadproc/beos
parent473c87316e7cf23eadb438189d2932b86ac8afae (diff)
downloadapr-443247b17081cb00b0e7f2f688889417cb45871f.tar.gz
Fix various issues found by cppcheck
- error handling issues - use of uninitialized data - null pointer dereference - unused variables - memory/fd leaks - broken code in threadproc/beos/proc.c git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@979891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/beos')
-rw-r--r--threadproc/beos/proc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c
index 3092f4502..e3698082f 100644
--- a/threadproc/beos/proc.c
+++ b/threadproc/beos/proc.c
@@ -362,8 +362,9 @@ APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_fi
== APR_SUCCESS)
rv = apr_file_inherit_set(attr->child_in);
}
+ }
- if (parent_in != NULL && rv == APR_SUCCESS) {
+ if (parent_in != NULL && rv == APR_SUCCESS)
rv = apr_file_dup(&attr->parent_in, parent_in, attr->pool);
return rv;
@@ -391,7 +392,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_f
}
}
- if (parent_out != NULL && rv == APR_SUCCESS) {
+ if (parent_out != NULL && rv == APR_SUCCESS)
rv = apr_file_dup(&attr->parent_out, parent_out, attr->pool);
return rv;
@@ -419,7 +420,7 @@ APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_f
}
}
- if (parent_err != NULL && rv == APR_SUCCESS) {
+ if (parent_err != NULL && rv == APR_SUCCESS)
rv = apr_file_dup(&attr->parent_err, parent_err, attr->pool);
return rv;