diff options
author | Xinchen Hui <laruence@php.net> | 2015-05-15 22:57:17 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-05-15 22:57:17 +0800 |
commit | 48f3f44f3200cf7284322f80cc34511866b3d5f5 (patch) | |
tree | 51e5442e06a2762cc1ea434be84642a3f3b7405b /ext/gettext | |
parent | a4640457263e2e6abaa2df3c66fae89ccca9257f (diff) | |
download | php-git-48f3f44f3200cf7284322f80cc34511866b3d5f5.tar.gz |
Hint the compiler
Diffstat (limited to 'ext/gettext')
-rw-r--r-- | ext/gettext/gettext.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index 90038fad5c..44502729e5 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -139,13 +139,13 @@ ZEND_GET_MODULE(php_gettext) #define PHP_GETTEXT_MAX_MSGID_LENGTH 4096 #define PHP_GETTEXT_DOMAIN_LENGTH_CHECK \ - if (domain_len > PHP_GETTEXT_MAX_DOMAIN_LENGTH) { \ + if (UNEXPECTED(domain_len > PHP_GETTEXT_MAX_DOMAIN_LENGTH)) { \ php_error_docref(NULL, E_WARNING, "domain passed too long"); \ RETURN_FALSE; \ } #define PHP_GETTEXT_LENGTH_CHECK(check_name, check_len) \ - if (check_len > PHP_GETTEXT_MAX_MSGID_LENGTH) { \ + if (UNEXPECTED(check_len > PHP_GETTEXT_MAX_MSGID_LENGTH)) { \ php_error_docref(NULL, E_WARNING, "%s passed too long", check_name); \ RETURN_FALSE; \ } |