]> granicus.if.org Git - php/commitdiff
Remove dead code in base64.c
authorGeorge Peter Banyard <girgias@php.net>
Tue, 20 Aug 2019 18:15:22 +0000 (20:15 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Tue, 20 Aug 2019 19:42:06 +0000 (21:42 +0200)
ext/standard/base64.c

index ea15ddcec6f523f3578ffe664cbb90e191c24b36..0dd40458875cfbc159cbc5ca13da2f46d6183087 100644 (file)
@@ -669,39 +669,6 @@ zend_string *php_base64_encode_ssse3(const unsigned char *str, size_t length)
 
 /* }}} */
 
-/* {{{ php_base64_decode_ex */
-/* generate reverse table (do not set index 0 to 64)
-static unsigned short base64_reverse_table[256];
-#define rt base64_reverse_table
-void php_base64_init(void)
-{
-       char *s = emalloc(10240), *sp;
-       char *chp;
-       short idx;
-
-       for(ch = 0; ch < 256; ch++) {
-               chp = strchr(base64_table, ch);
-               if(ch && chp) {
-                       idx = chp - base64_table;
-                       if (idx >= 64) idx = -1;
-                       rt[ch] = idx;
-               } else {
-                       rt[ch] = -1;
-               }
-       }
-       sp = s;
-       sprintf(sp, "static const short base64_reverse_table[256] = {\n");
-       for(ch =0; ch < 256;) {
-               sp = s+strlen(s);
-               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]);
-               ch += 16;
-       }
-       sprintf(sp, "};");
-       php_error_docref(NULL, E_NOTICE, "Reverse_table:\n%s", s);
-       efree(s);
-}
-*/
-
 #if ZEND_INTRIN_AVX2_NATIVE || ZEND_INTRIN_AVX2_RESOLVER
 # if ZEND_INTRIN_AVX2_RESOLVER && defined(HAVE_FUNC_ATTRIBUTE_TARGET)
 static __m256i php_base64_decode_avx2_reshuffle(__m256i in) __attribute__((target("avx2")));