/* this sucks for threaded environments */
static short reverse_table[256];
static int table_built;
+ unsigned char *result;
- if(++table_built == 1) {
+ if (++table_built == 1) {
char *chp;
for(ch = 0; ch < 256; ch++) {
chp = strchr(base64_table, ch);
- if(chp)
+ if(chp) {
reverse_table[ch] = chp - base64_table;
- else
+ } else {
reverse_table[ch] = -1;
+ }
+ }
}
- unsigned char *result = (unsigned char *)emalloc((length / 4 * 3 + 1) * sizeof(char));
+ result = (unsigned char *)emalloc((length / 4 * 3 + 1) * sizeof(char));
if (result == NULL) {
return NULL;
}