diff options
author | Sascha Schumann <sas@php.net> | 2000-03-16 19:19:14 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-03-16 19:19:14 +0000 |
commit | 2a3fdcb73d666b772b494f00a8cdc07f3c33b914 (patch) | |
tree | 3e1c557d4c1b75915159cefce3b8c60890af0188 /main/php_virtual_cwd.c | |
parent | 8c9388c984cfa0a336567979726678da8fc5397f (diff) | |
download | php-git-2a3fdcb73d666b772b494f00a8cdc07f3c33b914.tar.gz |
Cleanup
Diffstat (limited to 'main/php_virtual_cwd.c')
-rw-r--r-- | main/php_virtual_cwd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c index 31c4368885..85dcb170ea 100644 --- a/main/php_virtual_cwd.c +++ b/main/php_virtual_cwd.c @@ -149,7 +149,7 @@ int virtual_chdir(cwd_state *state, char *path) } if (copy_amount != -1) { - state->cwd = realloc(state->cwd, copy_amount + 1); + state->cwd = (char *) realloc(state->cwd, copy_amount + 1); if (copy_amount) memcpy(state->cwd, old_state->cwd, copy_amount); state->cwd[copy_amount] = '\0'; @@ -219,11 +219,10 @@ void main(void) state.cwd_length <<= 1; state.cwd = realloc(state.cwd, state.cwd_length + 1); } - state.cwd_length = strlen(state.cwd); #else state.cwd = strdup("d:\\foo\\bar"); - state.cwd_length = strlen(state.cwd); #endif + state.cwd_length = strlen(state.cwd); #define T(a) \ printf("[%s] $ cd %s\n", virtual_getcwd(&state, &length), a); \ |