cvs: /php4 php_virtual_cwd.c
| From: | Sascha Schumann | Date: | Thu, 16 Mar 2000 19:19:44 +0000 |
| Subject: | cvs: /php4 php_virtual_cwd.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-12278@lists.php.net to get a copy of this message | ||
sas Thu Mar 16 11:19:44 2000 EDT
Modified files:
/php4 php_virtual_cwd.c
Log:
Cleanup
Index: php4/php_virtual_cwd.c
diff -u php4/php_virtual_cwd.c:1.8 php4/php_virtual_cwd.c:1.9
--- php4/php_virtual_cwd.c:1.8 Thu Mar 16 11:14:13 2000
+++ php4/php_virtual_cwd.c Thu Mar 16 11:19:14 2000
@@ -149,7 +149,7 @@
}
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 @@
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); \