summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2004-06-28 18:12:28 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2004-06-28 18:12:28 +0000
commit3e53c4b52942a420278e74e26b5b7a0ca458a159 (patch)
tree941a94415211b084c64b93009908104547febb9d /threadproc
parent4ee201910ff6dcf0597f787249ab293633863876 (diff)
downloadlibapr-3e53c4b52942a420278e74e26b5b7a0ca458a159.tar.gz
Simplify cwd creation on beos
Backport of 1.53 (excluding whitespace changes) Submitted by: wrowe, improvements by martin Reviewed by: dreid, trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65228 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r--threadproc/beos/proc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c
index ff6ac1e0d..d733de138 100644
--- a/threadproc/beos/proc.c
+++ b/threadproc/beos/proc.c
@@ -114,12 +114,10 @@ APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr,
const char *dir)
{
char * cwd;
- if (strncmp("/",dir,1) != 0 ) {
+ if (dir[0] != '/') {
cwd = (char*)malloc(sizeof(char) * PATH_MAX);
getcwd(cwd, PATH_MAX);
- strncat(cwd,"/\0",2);
- strcat(cwd,dir);
- attr->currdir = (char *)apr_pstrdup(attr->pool, cwd);
+ attr->currdir = (char *)apr_pstrcat(attr->pool, cwd, "/", dir, NULL);
free(cwd);
} else {
attr->currdir = (char *)apr_pstrdup(attr->pool, dir);