diff options
author | Wolfgang Denk <wd@denx.de> | 2011-07-29 12:42:18 (GMT) |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-07-29 23:37:44 (GMT) |
commit | 84b5e8022ef62b68df360392a55c4fc2f2e568d7 (patch) | |
tree | d594068eabcd2dd548585430ea36f9ababe7657d /lib | |
parent | 7ca9296e1b5b165a2c4db49c44716764f1c7dc44 (diff) | |
download | u-boot-84b5e8022ef62b68df360392a55c4fc2f2e568d7.tar.xz |
Constify getenv(), setenv() and hash code functions
This is needed to get rid of build warnings like
main.c:311: warning: passing argument 2 of 'setenv' discards qualifiers from pointer target type
which result from commit 09c2e90 "unify version_string".
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hashtable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hashtable.c b/lib/hashtable.c index 19d5b15..026dbca 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -155,7 +155,7 @@ void hdestroy_r(struct hsearch_data *htab) if (htab->table[i].used > 0) { ENTRY *ep = &htab->table[i].entry; - free(ep->key); + free((void *)ep->key); free(ep->data); } } @@ -416,7 +416,7 @@ int hdelete_r(const char *key, struct hsearch_data *htab) /* free used ENTRY */ debug("hdelete: DELETING key \"%s\"\n", key); - free(ep->key); + free((void *)ep->key); free(ep->data); htab->table[idx].used = -1; @@ -564,7 +564,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, * export sorted list of result data */ for (i = 0, p = res; i < n; ++i) { - char *s; + const char *s; s = list[i]->key; while (*s) |