Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 375e740

Browse files
Change implicit enum return value checks to explicit checks (#10703)
1 parent f0cfebc commit 375e740

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎ext/opcache/ZendAccelerator.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4014,7 +4014,7 @@ static void preload_link(void)
40144014
zend_error_at(
40154015
E_WARNING, ce->info.user.filename, ce->info.user.line_start,
40164016
"Can't preload already declared class %s", ZSTR_VAL(ce->name));
4017-
} else if (preload_resolve_deps(&error, ce)) {
4017+
} else if (preload_resolve_deps(&error, ce)==FAILURE) {
40184018
zend_error_at(
40194019
E_WARNING, ce->info.user.filename, ce->info.user.line_start,
40204020
"Can't preload unlinked class %s: %s%s",

‎ext/standard/filters.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,15 +1187,15 @@ static php_conv *php_conv_open(int conv_mode, const HashTable *options, int pers
11871187
}
11881188
retval = pemalloc(sizeof(php_conv_base64_encode), persistent);
11891189
if (lbchars != NULL) {
1190-
if (php_conv_base64_encode_ctor((php_conv_base64_encode *)retval, line_len, lbchars, lbchars_len, 1, persistent)) {
1190+
if (php_conv_base64_encode_ctor((php_conv_base64_encode *)retval, line_len, lbchars, lbchars_len, 1, persistent)!=PHP_CONV_ERR_SUCCESS) {
11911191
if (lbchars != NULL) {
11921192
pefree(lbchars, 0);
11931193
}
11941194
goto out_failure;
11951195
}
11961196
pefree(lbchars, 0);
11971197
} else {
1198-
if (php_conv_base64_encode_ctor((php_conv_base64_encode *)retval, 0, NULL, 0, 0, persistent)) {
1198+
if (php_conv_base64_encode_ctor((php_conv_base64_encode *)retval, 0, NULL, 0, 0, persistent)!=PHP_CONV_ERR_SUCCESS) {
11991199
goto out_failure;
12001200
}
12011201
}
@@ -1239,13 +1239,13 @@ static php_conv *php_conv_open(int conv_mode, const HashTable *options, int pers
12391239
}
12401240
retval = pemalloc(sizeof(php_conv_qprint_encode), persistent);
12411241
if (lbchars != NULL) {
1242-
if (php_conv_qprint_encode_ctor((php_conv_qprint_encode *)retval, line_len, lbchars, lbchars_len, 1, opts, persistent)) {
1242+
if (php_conv_qprint_encode_ctor((php_conv_qprint_encode *)retval, line_len, lbchars, lbchars_len, 1, opts, persistent)!=PHP_CONV_ERR_SUCCESS) {
12431243
pefree(lbchars, 0);
12441244
goto out_failure;
12451245
}
12461246
pefree(lbchars, 0);
12471247
} else {
1248-
if (php_conv_qprint_encode_ctor((php_conv_qprint_encode *)retval, 0, NULL, 0, 0, opts, persistent)) {
1248+
if (php_conv_qprint_encode_ctor((php_conv_qprint_encode *)retval, 0, NULL, 0, 0, opts, persistent)!=PHP_CONV_ERR_SUCCESS) {
12491249
goto out_failure;
12501250
}
12511251
}
@@ -1262,13 +1262,13 @@ static php_conv *php_conv_open(int conv_mode, const HashTable *options, int pers
12621262

12631263
retval = pemalloc(sizeof(php_conv_qprint_decode), persistent);
12641264
if (lbchars != NULL) {
1265-
if (php_conv_qprint_decode_ctor((php_conv_qprint_decode *)retval, lbchars, lbchars_len, 1, persistent)) {
1265+
if (php_conv_qprint_decode_ctor((php_conv_qprint_decode *)retval, lbchars, lbchars_len, 1, persistent)!=PHP_CONV_ERR_SUCCESS) {
12661266
pefree(lbchars, 0);
12671267
goto out_failure;
12681268
}
12691269
pefree(lbchars, 0);
12701270
} else {
1271-
if (php_conv_qprint_decode_ctor((php_conv_qprint_decode *)retval, NULL, 0, 0, persistent)) {
1271+
if (php_conv_qprint_decode_ctor((php_conv_qprint_decode *)retval, NULL, 0, 0, persistent)!=PHP_CONV_ERR_SUCCESS) {
12721272
goto out_failure;
12731273
}
12741274
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /