From: Arran Cudbard-Bell Date: Fri, 13 Jun 2014 16:57:16 +0000 (+0100) Subject: Declare more things as arrays X-Git-Tag: release_3_0_4_rc2~323 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=c7f56721bd75134ccbcabed7f123623a255d03c7;p=freeradius.git Declare more things as arrays --- diff --git a/src/lib/base64.c b/src/lib/base64.c index 1509400..fe18f39 100644 --- a/src/lib/base64.c +++ b/src/lib/base64.c @@ -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)) { diff --git a/src/lib/radius.c b/src/lib/radius.c index 858feb2..13f2112 100644 --- a/src/lib/radius.c +++ b/src/lib/radius.c @@ -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) { diff --git a/src/main/command.c b/src/main/command.c index 96e9b72..b100d8a 100644 --- a/src/main/command.c +++ b/src/main/command.c @@ -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? diff --git a/src/main/conffile.c b/src/main/conffile.c index 1aa61f7..f392a09 100644 --- a/src/main/conffile.c +++ b/src/main/conffile.c @@ -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 * diff --git a/src/main/mainconfig.c b/src/main/mainconfig.c index 06fc70a..f802ff7 100644 --- a/src/main/mainconfig.c +++ b/src/main/mainconfig.c @@ -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]) { /* diff --git a/src/main/modcall.c b/src/main/modcall.c index bab53cb..9f222bd 100644 --- a/src/main/modcall.c +++ b/src/main/modcall.c @@ -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) diff --git a/src/main/xlat.c b/src/main/xlat.c index 3587de7..d12526f 100644 --- a/src/main/xlat.c +++ b/src/main/xlat.c @@ -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, diff --git a/src/modules/rlm_mschap/mschap.c b/src/modules/rlm_mschap/mschap.c index f1172a8..b4236e0 100644 --- a/src/modules/rlm_mschap/mschap.c +++ b/src/modules/rlm_mschap/mschap.c @@ -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]; diff --git a/src/modules/rlm_mschap/smbencrypt.c b/src/modules/rlm_mschap/smbencrypt.c index 69c1e0f..d6a20dc 100644 --- a/src/modules/rlm_mschap/smbencrypt.c +++ b/src/modules/rlm_mschap/smbencrypt.c @@ -31,7 +31,7 @@ RCSID("$Id$") #include "smbdes.h" -static char const * hex = "0123456789ABCDEF"; +static char const hex[] = "0123456789ABCDEF"; /* * FIXME: use functions in freeradius