diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-25 10:06:13 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-02-25 10:06:13 +0100 |
commit | 16897aacce85df66a34a04d3b5a84bbe7b8c4871 (patch) | |
tree | e94c78d190b8f2e46db4f29b9b623c974c443160 /ext/intl/breakiterator/breakiterator_methods.cpp | |
parent | a9398056417d27cb1754cdb846411c695d3afe10 (diff) | |
download | php-git-16897aacce85df66a34a04d3b5a84bbe7b8c4871.tar.gz |
Remove unnecessary checks in breakpoint iterator
The result of Z_INTL_BREAKITERATOR_P() cannot be NULL. This type
of macro in general can never be NULL.
Diffstat (limited to 'ext/intl/breakiterator/breakiterator_methods.cpp')
-rw-r--r-- | ext/intl/breakiterator/breakiterator_methods.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp index 3f2dded5ef..fc1c813499 100644 --- a/ext/intl/breakiterator/breakiterator_methods.cpp +++ b/ext/intl/breakiterator/breakiterator_methods.cpp @@ -383,9 +383,6 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_code) /* Fetch the object (without resetting its last error code ). */ bio = Z_INTL_BREAKITERATOR_P(object); - if (bio == NULL) - RETURN_FALSE; - RETURN_LONG((zend_long)BREAKITER_ERROR_CODE(bio)); } @@ -402,8 +399,6 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_message) /* Fetch the object (without resetting its last error code ). */ bio = Z_INTL_BREAKITERATOR_P(object); - if (bio == NULL) - RETURN_FALSE; /* Return last error message. */ message = intl_error_get_message(BREAKITER_ERROR_P(bio)); |