]> granicus.if.org Git - php/commitdiff
Fix CS
authorRasmus Lerdorf <rasmus@php.net>
Thu, 19 May 2011 23:18:55 +0000 (23:18 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Thu, 19 May 2011 23:18:55 +0000 (23:18 +0000)
TSRM/tsrm_virtual_cwd.c

index ca9809b104d5b785fdac43fdf22431eebbf3e6c9..1ceaad7b15b6bff8e3c3041389bcdc9cf2ccdac2 100644 (file)
@@ -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,11 +701,12 @@ 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 &&
                                        memcmp(path, (*bucket)->path, path_len) == 0) {