cvs: TSRM / tsrm_virtual_cwd.c

From: Date: Tue, 22 Oct 2002 18:39:33 +0000
Subject: cvs: TSRM / tsrm_virtual_cwd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-15156@lists.php.net to get a copy of this message
iliaa Tue Oct 22 14:39:33 2002 EDT Modified files: /TSRM tsrm_virtual_cwd.c Log: Fixed compile warnings. Index: TSRM/tsrm_virtual_cwd.c diff -u TSRM/tsrm_virtual_cwd.c:1.33 TSRM/tsrm_virtual_cwd.c:1.34 --- TSRM/tsrm_virtual_cwd.c:1.33 Mon Oct 21 19:35:28 2002 +++ TSRM/tsrm_virtual_cwd.c Tue Oct 22 14:39:33 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.33 2002/10/21 23:35:28 iliaa Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.34 2002/10/22 18:39:33 iliaa Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -284,7 +284,6 @@ CWD_API char *virtual_link(char *buf, size_t size TSRMLS_DC) { - size_t length; char *p; char tmp_path[MAXPATHLEN * 2]; char resolved_path[MAXPATHLEN]; @@ -292,7 +291,7 @@ if (IS_ABSOLUTE_PATH(buf, size)) { memcpy(resolved_path, buf, size); p[size] = '\0'; - return resolved_path; + p = resolved_path; } else { virtual_getcwd(tmp_path, MAXPATHLEN TSRMLS_CC); p = tmp_path + strlen(tmp_path); @@ -300,8 +299,10 @@ memcpy(p, buf, size); *(p + size) = '\0'; - return tmp_path; + p = tmp_path; } + + return p; } /* Resolve path relatively to state and put the real path into state */ @@ -723,17 +724,12 @@ #if !defined(TSRM_WIN32) && !defined(NETWARE) CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) { - cwd_state new_state; int retval; char *p; - CWD_STATE_COPY(&new_state, &CWDG(cwd)); - /* virtual_file_ex(&new_state, path, NULL); */ p = virtual_link(path, strlen(path) TSRMLS_CC); - retval = lstat(p, buf); - CWD_STATE_FREE(&new_state); return retval; } #endif

« previous php.cvs (#15156) next »