com php-src: simplify condition: ext/mbstring/php_mbregex.c
| From: | Anatol Belski | Date: | Fri, 19 Sep 2014 14:30:01 +0000 |
| Subject: | com php-src: simplify condition: ext/mbstring/php_mbregex.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81777@lists.php.net to get a copy of this message | ||
Commit: 469c9bdb392ab0d8c91d7e2ab5ff93c650489143
Author: Anatol Belski <ab@php.net> Fri, 19 Sep 2014 15:04:06 +0200
Parents: bccc653185d2fe8aa6ff83cf84db56a396c6bc05
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=469c9bdb392ab0d8c91d7e2ab5ff93c650489143
Log:
simplify condition
Changed paths:
M ext/mbstring/php_mbregex.c
Diff:
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 62b3e96..36147e9 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -717,7 +717,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
/* don't bother doing an extended regex with just a number */
}
- if (!Z_STRVAL_P(arg_pattern)[0] || Z_STRLEN_P(arg_pattern) == 0) {
+ if (Z_STRLEN_P(arg_pattern) == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "empty pattern");
RETVAL_FALSE;
goto out;