summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2011-05-19 23:18:55 +0000
committerRasmus Lerdorf <rasmus@php.net>2011-05-19 23:18:55 +0000
commit4ad9f1970ce9ab756acc14947a0d8ddf7f696b78 (patch)
treef17b4cc7e9e378200062df8ea88f9ea36982b736 /TSRM
parent01a6840bbd4ed8b5264353d145d60c529b60715e (diff)
downloadphp-git-4ad9f1970ce9ab756acc14947a0d8ddf7f696b78.tar.gz
Fix CS
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index ca9809b104..0889ea664a 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -619,10 +619,11 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{
*bucket = (*bucket)->next;
/* if the pointers match then only subtract the length of the path */
- if(r->path == r->realpath)
- CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
- else
- CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
+ if(r->path == r->realpath) {
+ CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
+ } else {
+ CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
+ }
free(r);
return;
@@ -700,10 +701,11 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
*bucket = (*bucket)->next;
/* if the pointers match then only subtract the length of the path */
- if(r->path == r->realpath)
- CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
- else
- CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
+ if(r->path == r->realpath) {
+ CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
+ } else {
+ CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
+ }
free(r);
} else if (key == (*bucket)->key && path_len == (*bucket)->path_len &&