diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-04-05 03:33:38 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-04-05 03:38:12 +0200 |
commit | 352572f18e30295cab3d260efd5c5455026443fa (patch) | |
tree | 6a2df4ab7c8b656e1c8f6ebbf128b7041ea8a921 /parse.c | |
parent | 862b173154812f4efe5ad198604106826422b508 (diff) | |
download | uci-352572f18e30295cab3d260efd5c5455026443fa.tar.gz |
constify arguments to parser function
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -17,7 +17,7 @@ #include "uci.h" -void uci_parse_section(struct uci_section *s, struct uci_parse_option *opts, +void uci_parse_section(struct uci_section *s, const struct uci_parse_option *opts, int n_opts, struct uci_option **tb) { struct uci_element *e; @@ -90,9 +90,9 @@ static uint32_t hash_murmur2(uint32_t h, const void * key, int len) return h; } -static uint32_t uci_hash_list(uint32_t h, struct uci_list *list) +static uint32_t uci_hash_list(uint32_t h, const struct uci_list *list) { - struct uci_element *e; + const struct uci_element *e; uci_foreach_element(list, e) { h = hash_murmur2(h, e->name, strlen(e->name) + 1); @@ -106,7 +106,7 @@ uint32_t uci_hash_options(struct uci_option **tb, int n_opts) int i; for (i = 0; i < n_opts; i++) { - struct uci_option *o = tb[i]; + const struct uci_option *o = tb[i]; if (!tb[i]) continue; |