com php-src: simplify error handling for dirs as magic: ext/fileinfo/libmagic/apprentice.c
| From: | Anatol Belski | Date: | Thu, 22 Jan 2015 09:16:13 +0000 |
| Subject: | com php-src: simplify error handling for dirs as magic: ext/fileinfo/libmagic/apprentice.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84308@lists.php.net to get a copy of this message | ||
Commit: 43652d386a753c0a280790525e3593ecb416793c
Author: Anatol Belski <ab@php.net> Thu, 22 Jan 2015 10:16:13 +0100
Parents: 91aa340180eccfc15d4a143b54d47b8120f898be
Branches: PHP-5.5 PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=43652d386a753c0a280790525e3593ecb416793c
Log:
simplify error handling for dirs as magic
Changed paths:
M ext/fileinfo/libmagic/apprentice.c
Diff:
diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c
index 1cbe0fc..964d756 100644
--- a/ext/fileinfo/libmagic/apprentice.c
+++ b/ext/fileinfo/libmagic/apprentice.c
@@ -2616,7 +2616,7 @@ apprentice_map(struct magic_set *ms, const char *fn)
return to give apprentice_load() a chance. */
if (php_stream_stat_path_ex((char *)fn, 0, &st, NULL) == SUCCESS) {
if (st.sb.st_mode & S_IFDIR) {
- goto error;
+ return NULL;
}
}
#endif