Declare more things as arrays
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 13 Jun 2014 16:57:16 +0000 (17:57 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 13 Jun 2014 17:00:42 +0000 (18:00 +0100)
src/lib/base64.c
src/lib/radius.c
src/main/command.c
src/main/conffile.c
src/main/mainconfig.c
src/main/modcall.c
src/main/xlat.c
src/modules/rlm_mschap/mschap.c
src/modules/rlm_mschap/smbencrypt.c

index 1509400..fe18f39 100644 (file)
@@ -42,8 +42,7 @@ RCSID("$Id$")
  */
 size_t fr_base64_encode(char *out, size_t outlen, uint8_t const *in, size_t inlen)
 {
-       static char const b64str[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"
-                                      "nopqrstuvwxyz0123456789+/";
+       static char const b64str[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
        char *p = out;
        if (outlen < (FR_BASE64_ENC_LENGTH(inlen) + 1)) {
index 858feb2..13f2112 100644 (file)
@@ -162,7 +162,7 @@ void fr_printf_log(char const *fmt, ...)
        return;
 }
 
-static char const *tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
+static char const tabs[] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
 
 static void print_hex_data(uint8_t const *ptr, int attrlen, int depth)
 {
index 96e9b72..b100d8a 100644 (file)
@@ -386,7 +386,7 @@ static int command_show_config(rad_listen_t *listener, int argc, char *argv[])
        return 1;               /* success */
 }
 
-static char const *tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
+static char const tabs[] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
 
 /*
  *     FIXME: Recurse && indent?
index 1aa61f7..f392a09 100644 (file)
@@ -905,7 +905,7 @@ static char const *cf_expand_variables(char const *cf, int *lineno,
        return output;
 }
 
-static char const *parse_spaces = "                                                                                                                                                                                                                                                                ";
+static char const parse_spaces[] = "                                                                                                                                                                                                                                                                ";
 
 /** Validation function for ipaddr conffile types
  *
index 06fc70a..f802ff7 100644 (file)
@@ -229,7 +229,7 @@ static const CONF_PARSER bootstrap_config[] = {
 static size_t config_escape_func(UNUSED REQUEST *request, char *out, size_t outlen, char const *in, UNUSED void *arg)
 {
        size_t len = 0;
-       static char const *disallowed = "%{}\\'\"`";
+       static char const disallowed[] = "%{}\\'\"`";
 
        while (in[0]) {
                /*
index bab53cb..9f222bd 100644 (file)
@@ -367,7 +367,7 @@ static char const *group_name[] = {
        "xlat"
 };
 
-static char const *modcall_spaces = "                                                                ";
+static char const modcall_spaces[] = "                                                                ";
 
 #define MODCALL_STACK_MAX (32)
 
index 3587de7..d12526f 100644 (file)
@@ -1862,7 +1862,7 @@ finish:
 }
 
 #ifdef DEBUG_XLAT
-static const char *xlat_spaces = "                                                                                                                                                                                                                                                                ";
+static const char xlat_spaces[] = "                                                                                                                                                                                                                                                                ";
 #endif
 
 static char *xlat_aprint(TALLOC_CTX *ctx, REQUEST *request, xlat_exp_t const * const node,
index f1172a8..b4236e0 100644 (file)
@@ -108,7 +108,7 @@ void mschap_auth_response(char const *username,
         0x65, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6F,
         0x6E};
 
-       static char const hex[16] = "0123456789ABCDEF";
+       static char const hex[] = "0123456789ABCDEF";
 
        size_t i;
        uint8_t challenge[8];
index 69c1e0f..d6a20dc 100644 (file)
@@ -31,7 +31,7 @@ RCSID("$Id$")
 
 #include       "smbdes.h"
 
-static char const * hex = "0123456789ABCDEF";
+static char const hex[] = "0123456789ABCDEF";
 
 /*
  *     FIXME: use functions in freeradius