Skip to content

Commit 3e41572

Browse files
committed
ext/standard/basic_functions.c: use RETURN_BOOL() when possible
1 parent e0c3cc6 commit 3e41572

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

ext/standard/basic_functions.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,11 +1342,7 @@ PHP_FUNCTION(error_log)
13421342
Z_PARAM_STRING_OR_NULL(headers, headers_len)
13431343
ZEND_PARSE_PARAMETERS_END();
13441344

1345-
if (_php_error_log_ex((int) erropt, message, message_len, opt, headers) == FAILURE) {
1346-
RETURN_FALSE;
1347-
}
1348-
1349-
RETURN_TRUE;
1345+
RETURN_BOOL(_php_error_log_ex((int) erropt, message, message_len, opt, headers) == SUCCESS);
13501346
}
13511347
/* }}} */
13521348

@@ -2322,11 +2318,7 @@ PHP_FUNCTION(is_uploaded_file)
23222318
RETURN_FALSE;
23232319
}
23242320

2325-
if (zend_hash_exists(SG(rfc1867_uploaded_files), path)) {
2326-
RETURN_TRUE;
2327-
} else {
2328-
RETURN_FALSE;
2329-
}
2321+
RETURN_BOOL(zend_hash_exists(SG(rfc1867_uploaded_files), path));
23302322
}
23312323
/* }}} */
23322324

0 commit comments

Comments
 (0)