diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-09-09 20:05:27 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-09-09 20:05:27 -0700 |
commit | 9f0f4a2c5495eec2d81a4381fb962fad93b2ddde (patch) | |
tree | 7608fb1bc62b2df1c8bcb4f549a35607a37e905b /hash.c | |
parent | 40615f52b8fe7478599ce4948ccc751aa0a34397 (diff) |
Copious const cleanup
Removes 1554 gcc warnings of "discards ‘const’ qualifier"
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -53,7 +53,6 @@ * Prototypes */ static int hash_equal(hash_table *hash, hash_key *left, hash_key *right); -static unsigned int hash_data(char *value, unsigned int length); static unsigned int hash_value(hash_key *key); @@ -75,9 +74,9 @@ hash_equal(hash_table *hash, hash_key *left, hash_key *right) } static unsigned int -hash_data(char *value, unsigned int length) +hash_data(const char *value, unsigned int length) { - char *ptr; + const char *ptr; unsigned int i, key; for (i = key = 0, ptr = value; i < length; i++) @@ -181,7 +180,7 @@ hash_get(hash_table *hash, hash_key *name) } hash_entry * -hash_check(hash_table *hash, char *name, unsigned int length) +hash_check(hash_table *hash, const char *name, unsigned int length) { unsigned int key; hash_entry *entry; |