summaryrefslogtreecommitdiff
path: root/main/fopen_wrappers.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2011-07-26 09:27:53 +0000
committerPierre Joye <pajoye@php.net>2011-07-26 09:27:53 +0000
commit3b6ad85fa9b67a71c7d28c6b56cbf8f376cab0b1 (patch)
treefcbe77b755896f1df378399b62b1f0e5797bd84f /main/fopen_wrappers.c
parent5107df2d0443cb7bcb5817c03e2625a169ffd003 (diff)
downloadphp-git-3b6ad85fa9b67a71c7d28c6b56cbf8f376cab0b1.tar.gz
- simplify
Diffstat (limited to 'main/fopen_wrappers.c')
-rw-r--r--main/fopen_wrappers.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index 8766aaf893..2c18044b33 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -628,16 +628,11 @@ PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const c
filename_length = strlen(filename);
/* Relative path open */
- if (*filename == '.') {
- return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC);
- }
-
+ if ((*filename == '.')
/* Absolute path open */
- if (IS_ABSOLUTE_PATH(filename, filename_length)) {
- return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC);
- }
-
- if (!path || (path && !*path)) {
+ || IS_ABSOLUTE_PATH(filename, filename_length)
+ || (!path || (path && !*path))
+ ) {
return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC);
}