*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;
*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 &&