Declare hextab as an array
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 13 Jun 2014 16:52:21 +0000 (17:52 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 13 Jun 2014 16:52:33 +0000 (17:52 +0100)
src/lib/misc.c
src/lib/valuepair.c
src/main/radattr.c
src/modules/rlm_expr/rlm_expr.c
src/modules/rlm_yubikey/rlm_yubikey.c

index abe5c90..c9dc094 100644 (file)
@@ -991,7 +991,7 @@ void fr_ipaddr_mask(fr_ipaddr_t *addr, uint8_t prefix)
        addr->prefix = prefix;
 }
 
-static char const *hextab = "0123456789abcdef";
+static char const hextab[] = "0123456789abcdef";
 
 /** Convert hex strings to binary data
  *
index d2dc1f9..322c392 100644 (file)
@@ -1191,7 +1191,7 @@ void pairfilter(TALLOC_CTX *ctx, VALUE_PAIR **to, VALUE_PAIR **from, unsigned in
        }
 }
 
-static char const *hextab = "0123456789abcdef";
+static char const hextab[] = "0123456789abcdef";
 
 /** Convert string value to native attribute value
  *
index 125bd5e..56e7b92 100644 (file)
@@ -74,7 +74,7 @@ static ssize_t xlat_test(UNUSED void *instance, UNUSED REQUEST *request,
 
 static int encode_tlv(char *buffer, uint8_t *output, size_t outlen);
 
-static char const *hextab = "0123456789abcdef";
+static char const hextab[] = "0123456789abcdef";
 
 static int encode_data_string(char *buffer,
                              uint8_t *output, size_t outlen)
index 97f2a52..1e2d4c4 100644 (file)
@@ -95,7 +95,7 @@ static char randstr_salt[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmo
  */
 static char randstr_otp[] = "469ACGHJKLMNPQRUVWXYabdfhijkprstuvwxyz";
 
-static char const *hextab = "0123456789abcdef";
+static char const hextab[] = "0123456789abcdef";
 
 static int get_number(REQUEST *request, char const **string, int64_t *answer)
 {
index 01308df..5d16ad6 100644 (file)
@@ -55,8 +55,8 @@ static const CONF_PARSER module_config[] = {
        { NULL, -1, 0, NULL, NULL }             /* end the list */
 };
 
-static char const *modhextab = "cbdefghijklnrtuv";
-static char const *hextab = "0123456789abcdef";
+static char const modhextab[] = "cbdefghijklnrtuv";
+static char const hextab[] = "0123456789abcdef";
 
 #define is_modhex(x) (memchr(modhextab, tolower(x), 16))