aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorMikael Kanstrup <mikael.kanstrup@sonymobile.com>2015-04-24 07:19:53 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-25 14:33:06 (GMT)
commit8b423edbd3bb7b5b90cf3d82103d44bedab63e5c (patch)
tree12eb22ee298692ca04144fa97818aa1f8e93c0ab /hostapd/hostapd_cli.c
parentfd4fb28179a0b750dff4d38a72a7bf89a2c49813 (diff)
downloadhostap-8b423edbd3bb7b5b90cf3d82103d44bedab63e5c.zip
hostap-8b423edbd3bb7b5b90cf3d82103d44bedab63e5c.tar.gz
hostap-8b423edbd3bb7b5b90cf3d82103d44bedab63e5c.tar.bz2
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>
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 719d021..e299183 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -17,16 +17,16 @@
#include "common/version.h"
-static const char *hostapd_cli_version =
+static const char *const hostapd_cli_version =
"hostapd_cli v" VERSION_STR "\n"
"Copyright (c) 2004-2015, Jouni Malinen <j@w1.fi> and contributors";
-static const char *hostapd_cli_license =
+static const char *const hostapd_cli_license =
"This software may be distributed under the terms of the BSD license.\n"
"See README for more details.\n";
-static const char *hostapd_cli_full_license =
+static const char *const hostapd_cli_full_license =
"This software may be distributed under the terms of the BSD license.\n"
"\n"
"Redistribution and use in source and binary forms, with or without\n"
@@ -57,7 +57,7 @@ static const char *hostapd_cli_full_license =
"OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
"\n";
-static const char *commands_help =
+static const char *const commands_help =
"Commands:\n"
" mib get MIB variables (dot1x, dot11, radius)\n"
" sta <addr> get MIB variables for one station\n"
@@ -1015,7 +1015,7 @@ struct hostapd_cli_cmd {
int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
};
-static struct hostapd_cli_cmd hostapd_cli_commands[] = {
+static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "ping", hostapd_cli_cmd_ping },
{ "mib", hostapd_cli_cmd_mib },
{ "relog", hostapd_cli_cmd_relog },
@@ -1070,7 +1070,7 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = {
static void wpa_request(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
- struct hostapd_cli_cmd *cmd, *match = NULL;
+ const struct hostapd_cli_cmd *cmd, *match = NULL;
int count;
count = 0;