Skip to content

Commit 16897aa

Browse files
committed
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.
1 parent a939805 commit 16897aa

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

ext/intl/breakiterator/breakiterator_methods.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,6 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_code)
383383

384384
/* Fetch the object (without resetting its last error code ). */
385385
bio = Z_INTL_BREAKITERATOR_P(object);
386-
if (bio == NULL)
387-
RETURN_FALSE;
388-
389386
RETURN_LONG((zend_long)BREAKITER_ERROR_CODE(bio));
390387
}
391388

@@ -402,8 +399,6 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_message)
402399

403400
/* Fetch the object (without resetting its last error code ). */
404401
bio = Z_INTL_BREAKITERATOR_P(object);
405-
if (bio == NULL)
406-
RETURN_FALSE;
407402

408403
/* Return last error message. */
409404
message = intl_error_get_message(BREAKITER_ERROR_P(bio));

0 commit comments

Comments
 (0)