aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2024-03-17 15:27:22 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2024-03-17 15:27:22 +0000
commit5f41eb798b639774d5cb2a7656fbaf4c61a16352 (patch)
tree7e8da7d00fc4b4a6680b389500972d82358125bd
parentxmalloc: add xmemdup() and use to replace some uses of xmalloc+memcpy (diff)
base64: simplify lookup table initializer
-rw-r--r--base64.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/base64.c b/base64.c
index fe89e9fa..5d01ab07 100644
--- a/base64.c
+++ b/base64.c
@@ -36,12 +36,9 @@ static const uint8_t reverse_lookup[256] = {
};
static const char lookup[64] = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
- '+', '/',
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "abcdefghijklmnopqrstuvwxyz"
+ "0123456789+/"
};
char *