Fixed some non standard C.

This commit is contained in:
irungentoo 2015-05-01 16:05:59 -04:00
parent bd67129c3e
commit 6da97bb48a
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -160,25 +160,14 @@ static int decode(uint8_t *dest, uint8_t *src)
while (*p) {
uint8_t ch = *p++;
switch (ch) {
case 'A' ... 'Z': {
ch = ch - 'A';
break;
}
case 'a' ... 'z': {
ch = ch - 'a';
break;
}
case '0' ... '5': {
ch = ch - '0' + 26;
break;
}
default: {
return - 1;
}
if ('A' <= ch && ch <= 'Z') {
ch = ch - 'A';
} else if ('a' <= ch && ch <= 'z') {
ch = ch - 'a';
} else if ('0' <= ch && ch <= '5') {
ch = ch - '0' + 26;
} else {
return - 1;
}
*op |= (ch << bits);