com php-src: fix unsigned negation: Zend/zend_ast.c

From: Date: Mon, 15 Sep 2014 10:58:43 +0000
Subject: com php-src: fix unsigned negation: Zend/zend_ast.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81640@lists.php.net to get a copy of this message
Commit: 4e09d782efae9c22a81b9c46f0243c0d1e13771d Author: Anatol Belski <ab@php.net> Mon, 15 Sep 2014 11:59:48 +0200 Parents: d3622c2445060cd61cc63f3e79d8737a6342ee73 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4e09d782efae9c22a81b9c46f0243c0d1e13771d Log: fix unsigned negation Changed paths: M Zend/zend_ast.c Diff: diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 8c9607f..9604079 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -163,7 +163,7 @@ ZEND_API zend_ast *zend_ast_create_list(uint32_t init_children, zend_ast_kind ki } static inline zend_bool is_power_of_two(uint32_t n) { - return n == (n & -n); + return ((n != 0) && (n == (n & (~n + 1)))); } ZEND_API zend_ast *zend_ast_list_add(zend_ast *ast, zend_ast *op) {

« previous php.cvs (#81640) next »