Clean up unnecessary ternary expressions and simplify some returns

- Simplify conditions
- Use ZEND_HASH_APPLY_* instead of hard-coded booleans
- Use ZEND_NORMALIZE_BOOL
- Drop sign in favor of ZEND_NORMALIZE_BOOL
This commit is contained in:
Gabriel Caruso 2018-08-19 01:32:00 -03:00 committed by Peter Kokot
parent 6c16f9b69c
commit cdd8368d6f
26 changed files with 39 additions and 63 deletions

View file

@ -553,7 +553,7 @@ static int pgsql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, zend_ulon
break;
case PDO_PARAM_BOOL:
S->cols[colno].boolval = **ptr == 't' ? 1: 0;
S->cols[colno].boolval = **ptr == 't';
*ptr = (char *) &(S->cols[colno].boolval);
*len = sizeof(zend_bool);
break;