Skip to content

Commit 2baadf3

Browse files
committed
ext/standard/filters.c: Voidify php_conv_base64_decode_ctor()
It always returned SUCCESS
1 parent 54cc76f commit 2baadf3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ext/standard/filters.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ static unsigned int b64_tbl_dec[256] = {
469469
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
470470
};
471471

472-
static int php_conv_base64_decode_ctor(php_conv_base64_decode *inst)
472+
static void php_conv_base64_decode_ctor(php_conv_base64_decode *inst)
473473
{
474474
inst->_super.convert_op = (php_conv_convert_func) php_conv_base64_decode_convert;
475475
inst->_super.dtor = (php_conv_dtor_func) php_conv_base64_decode_dtor;
@@ -478,7 +478,6 @@ static int php_conv_base64_decode_ctor(php_conv_base64_decode *inst)
478478
inst->urem_nbits = 0;
479479
inst->ustat = 0;
480480
inst->eos = 0;
481-
return SUCCESS;
482481
}
483482

484483
static void php_conv_base64_decode_dtor(php_conv_base64_decode *inst)
@@ -1193,9 +1192,7 @@ static php_conv *php_conv_open(int conv_mode, const HashTable *options, int pers
11931192

11941193
case PHP_CONV_BASE64_DECODE:
11951194
retval = pemalloc(sizeof(php_conv_base64_decode), persistent);
1196-
if (php_conv_base64_decode_ctor((php_conv_base64_decode *)retval)) {
1197-
goto out_failure;
1198-
}
1195+
php_conv_base64_decode_ctor((php_conv_base64_decode *)retval);
11991196
break;
12001197

12011198
case PHP_CONV_QPRINT_ENCODE: {

0 commit comments

Comments
 (0)