diff options
author | Pierre Joye <pajoye@php.net> | 2011-07-26 09:27:53 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2011-07-26 09:27:53 +0000 |
commit | 3b6ad85fa9b67a71c7d28c6b56cbf8f376cab0b1 (patch) | |
tree | fcbe77b755896f1df378399b62b1f0e5797bd84f /main/fopen_wrappers.c | |
parent | 5107df2d0443cb7bcb5817c03e2625a169ffd003 (diff) | |
download | php-git-3b6ad85fa9b67a71c7d28c6b56cbf8f376cab0b1.tar.gz |
- simplify
Diffstat (limited to 'main/fopen_wrappers.c')
-rw-r--r-- | main/fopen_wrappers.c | 13 |
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); } |