Skip to content

Commit 01996c4

Browse files
committed
Remove dead code in base64.c
1 parent 15dcc18 commit 01996c4

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

ext/standard/base64.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -669,39 +669,6 @@ zend_string *php_base64_encode_ssse3(const unsigned char *str, size_t length)
669669

670670
/* }}} */
671671

672-
/* {{{ php_base64_decode_ex */
673-
/* generate reverse table (do not set index 0 to 64)
674-
static unsigned short base64_reverse_table[256];
675-
#define rt base64_reverse_table
676-
void php_base64_init(void)
677-
{
678-
char *s = emalloc(10240), *sp;
679-
char *chp;
680-
short idx;
681-
682-
for(ch = 0; ch < 256; ch++) {
683-
chp = strchr(base64_table, ch);
684-
if(ch && chp) {
685-
idx = chp - base64_table;
686-
if (idx >= 64) idx = -1;
687-
rt[ch] = idx;
688-
} else {
689-
rt[ch] = -1;
690-
}
691-
}
692-
sp = s;
693-
sprintf(sp, "static const short base64_reverse_table[256] = {\n");
694-
for(ch =0; ch < 256;) {
695-
sp = s+strlen(s);
696-
sprintf(sp, "\t% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,% 3d,\n", rt[ch+0], rt[ch+1], rt[ch+2], rt[ch+3], rt[ch+4], rt[ch+5], rt[ch+6], rt[ch+7], rt[ch+8], rt[ch+9], rt[ch+10], rt[ch+11], rt[ch+12], rt[ch+13], rt[ch+14], rt[ch+15]);
697-
ch += 16;
698-
}
699-
sprintf(sp, "};");
700-
php_error_docref(NULL, E_NOTICE, "Reverse_table:\n%s", s);
701-
efree(s);
702-
}
703-
*/
704-
705672
#if ZEND_INTRIN_AVX2_NATIVE || ZEND_INTRIN_AVX2_RESOLVER
706673
# if ZEND_INTRIN_AVX2_RESOLVER && defined(HAVE_FUNC_ATTRIBUTE_TARGET)
707674
static __m256i php_base64_decode_avx2_reshuffle(__m256i in) __attribute__((target("avx2")));

0 commit comments

Comments
 (0)