diff options
Diffstat (limited to 'threadproc/beos')
-rw-r--r-- | threadproc/beos/proc.c | 6 |
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); |