apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/threadproc/beos proc.c
Date Mon, 28 Jun 2004 18:12:28 GMT
wrowe       2004/06/28 11:12:28

  Modified:    threadproc/beos Tag: APR_0_9_BRANCH proc.c
  Log:
    Simplify cwd creation on beos
    Backport of 1.53 (excluding whitespace changes)
  
  Submitted by: wrowe, improvements by martin
  Reviewed by: dreid, trawick
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.50.2.2  +2 -4      apr/threadproc/beos/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/beos/proc.c,v
  retrieving revision 1.50.2.1
  retrieving revision 1.50.2.2
  diff -u -r1.50.2.1 -r1.50.2.2
  --- proc.c	13 Feb 2004 09:33:54 -0000	1.50.2.1
  +++ proc.c	28 Jun 2004 18:12:28 -0000	1.50.2.2
  @@ -114,12 +114,10 @@
                                                  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);
  
  
  

Mime
View raw message