Declare all read only data structures as const

By analysing objdump output some read only structures were found in
.data section. To help compiler further optimize code declare these
as const.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
This commit is contained in:
Mikael Kanstrup 2015-04-24 09:19:53 +02:00 committed by Jouni Malinen
parent fd4fb28179
commit 8b423edbd3
32 changed files with 93 additions and 92 deletions

View file

@ -564,27 +564,27 @@ enum hostapd_hw_mode ieee80211_freq_to_chan(int freq, u8 *channel)
}
static const char *us_op_class_cc[] = {
static const char *const us_op_class_cc[] = {
"US", "CA", NULL
};
static const char *eu_op_class_cc[] = {
static const char *const eu_op_class_cc[] = {
"AL", "AM", "AT", "AZ", "BA", "BE", "BG", "BY", "CH", "CY", "CZ", "DE",
"DK", "EE", "EL", "ES", "FI", "FR", "GE", "HR", "HU", "IE", "IS", "IT",
"LI", "LT", "LU", "LV", "MD", "ME", "MK", "MT", "NL", "NO", "PL", "PT",
"RO", "RS", "RU", "SE", "SI", "SK", "TR", "UA", "UK", NULL
};
static const char *jp_op_class_cc[] = {
static const char *const jp_op_class_cc[] = {
"JP", NULL
};
static const char *cn_op_class_cc[] = {
static const char *const cn_op_class_cc[] = {
"CN", "CA", NULL
};
static int country_match(const char *cc[], const char *country)
static int country_match(const char *const cc[], const char *const country)
{
int i;