aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-07-21 10:46:00 (GMT)
committerJouni Malinen <j@w1.fi>2015-07-21 10:56:19 (GMT)
commit63e169e149fce48827ba8482e6ea32b4bc8edc8b (patch)
tree0f042911170a2ed652cd1f4a0b0b40175b2e7cc4 /hostapd
parent4be0dd2232e03ce61667a3cbe62069667d6d64a7 (diff)
downloadhostap-63e169e149fce48827ba8482e6ea32b4bc8edc8b.zip
hostap-63e169e149fce48827ba8482e6ea32b4bc8edc8b.tar.gz
hostap-63e169e149fce48827ba8482e6ea32b4bc8edc8b.tar.bz2
hostapd: Mark config parameter name const
The functions parsing configuration parameters do not modify the name of the parameter, so mark that function argument constant. In theory, the value should also be const, but at least for now, number of the parser functions end up modifying this to simplify parsing. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c11
-rw-r--r--hostapd/config_file.h2
-rw-r--r--hostapd/ctrl_iface.c2
3 files changed, 8 insertions, 7 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index de6c321..0edf6af 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -912,11 +912,11 @@ enum {
IEEE80211_TX_QUEUE_DATA3 = 3 /* used for EDCA AC_BK data */
};
-static int hostapd_config_tx_queue(struct hostapd_config *conf, char *name,
- char *val)
+static int hostapd_config_tx_queue(struct hostapd_config *conf,
+ const char *name, const char *val)
{
int num;
- char *pos;
+ const char *pos;
struct hostapd_tx_queue_params *queue;
/* skip 'tx_queue_' prefix */
@@ -1936,7 +1936,7 @@ fail:
static int hostapd_config_fill(struct hostapd_config *conf,
struct hostapd_bss_config *bss,
- char *buf, char *pos, int line)
+ const char *buf, char *pos, int line)
{
if (os_strcmp(buf, "interface") == 0) {
os_strlcpy(conf->bss[0]->iface, pos,
@@ -3481,7 +3481,8 @@ struct hostapd_config * hostapd_config_read(const char *fname)
int hostapd_set_iface(struct hostapd_config *conf,
- struct hostapd_bss_config *bss, char *field, char *value)
+ struct hostapd_bss_config *bss, const char *field,
+ char *value)
{
int errors;
size_t i;
diff --git a/hostapd/config_file.h b/hostapd/config_file.h
index fba57b8..c98bdb6 100644
--- a/hostapd/config_file.h
+++ b/hostapd/config_file.h
@@ -11,7 +11,7 @@
struct hostapd_config * hostapd_config_read(const char *fname);
int hostapd_set_iface(struct hostapd_config *conf,
- struct hostapd_bss_config *bss, char *field,
+ struct hostapd_bss_config *bss, const char *field,
char *value);
#endif /* CONFIG_FILE_H */
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 2fe8e56..6be6c2a 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -2638,7 +2638,7 @@ hostapd_interfaces_get_hapd(struct hapd_interfaces *interfaces,
static int hostapd_ctrl_iface_dup_param(struct hostapd_data *src_hapd,
struct hostapd_data *dst_hapd,
- char *param)
+ const char *param)
{
int res;
char *value;