X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fciniparser%2Fdictionary.c;h=19dd6411cc9cceb3cabe311a079352f0836e74ed;hp=c76eae3e875b4f4e7208825ee895ea4d39e6c0fb;hb=HEAD;hpb=28f7279805d3c9378362003031ae537a32d9bec4 diff --git a/ccan/ciniparser/dictionary.c b/ccan/ciniparser/dictionary.c index c76eae3e..19dd6411 100644 --- a/ccan/ciniparser/dictionary.c +++ b/ccan/ciniparser/dictionary.c @@ -33,7 +33,7 @@ * * This module implements a simple dictionary object, i.e. a list * of string/string associations. This object is useful to store e.g. - * informations retrieved from a configuration file (ini files). + * information retrieved from a configuration file (ini files). */ #include "dictionary.h" @@ -72,7 +72,7 @@ static void *mem_double(void *ptr, int size) /* The remaining exposed functions are documented in dictionary.h */ -unsigned dictionary_hash(char *key) +unsigned dictionary_hash(const char *key) { int len; unsigned hash; @@ -126,7 +126,7 @@ void dictionary_del(dictionary *d) return; } -char *dictionary_get(dictionary *d, char *key, char *def) +char *dictionary_get(dictionary *d, const char *key, char *def) { unsigned hash; int i; @@ -146,7 +146,7 @@ char *dictionary_get(dictionary *d, char *key, char *def) return def; } -int dictionary_set(dictionary *d, char *key, char *val) +int dictionary_set(dictionary *d, const char *key, char *val) { int i; unsigned hash; @@ -206,7 +206,7 @@ int dictionary_set(dictionary *d, char *key, char *val) return 0; } -void dictionary_unset(dictionary *d, char *key) +void dictionary_unset(dictionary *d, const char *key) { unsigned hash; int i;