com php-src: Remove unnecessary NULL check: ext/standard/string.c
| From: | Nikita Popov | Date: | Sun, 25 Aug 2019 14:30:16 +0000 |
| Subject: | com php-src: Remove unnecessary NULL check: ext/standard/string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108035@lists.php.net to get a copy of this message | ||
Commit: 4346d1b0e66e99809ba7ad9592198f79f673e744
Author: Nikita Popov <nikita.ppv@gmail.com> Sun, 25 Aug 2019 16:09:20 +0200
Parents: d955ee9f6b7e60895cac412969f9ddec91fbd2bb
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4346d1b0e66e99809ba7ad9592198f79f673e744
Log:
Remove unnecessary NULL check
needle_dup cannot be NULL here.
Changed paths:
M ext/standard/string.c
Diff:
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 362ff75..4ec66e3 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1960,9 +1960,7 @@ PHP_FUNCTION(stripos)
}
zend_string_release_ex(haystack_dup, 0);
- if (needle_dup) {
- zend_string_release_ex(needle_dup, 0);
- }
+ zend_string_release_ex(needle_dup, 0);
}
/* }}} */