From 752b2f90fe2d98242672d660ad6b2262a1e88ba5 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sun, 4 Jan 2015 10:08:24 +0000 Subject: [PATCH] Cleanup: mark constant loopup tables read only --- src/util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util.c b/src/util.c index f26669b9..6f0c4de8 100644 --- a/src/util.c +++ b/src/util.c @@ -240,11 +240,11 @@ char *util_get_path_from_normalised_uri(const char *uri) { return fullpath; } -static char hexchars[16] = { +static const char hexchars[16] = { '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' }; -static char safechars[256] = { +static const char safechars[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -367,14 +367,14 @@ char *util_normalise_uri(const char *uri) { } } -static char base64table[64] = { +static const char base64table[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','+','/' }; -static signed char base64decode[256] = { +static const signed char base64decode[256] = { -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 62, -2, -2, -2, 63, -- 2.22.0