diff options
author | harti <harti@FreeBSD.org> | 2004-12-06 08:56:30 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2004-12-06 08:56:30 +0000 |
commit | 6fb43802bfdc98a60416c6e25bdb17f9f3819793 (patch) | |
tree | 898a68393a7aa45c3343e816ec55be9eae14acc7 /usr.bin/make | |
parent | cf54e99966d307d9c7ce0bb06bd3397aba9524f7 (diff) | |
download | FreeBSD-src-6fb43802bfdc98a60416c6e25bdb17f9f3819793.zip FreeBSD-src-6fb43802bfdc98a60416c6e25bdb17f9f3819793.tar.gz |
Constify arguments to Hash_FindEntry and Hash_CreateEntry.
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/hash.c | 8 | ||||
-rw-r--r-- | usr.bin/make/hash.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/make/hash.c b/usr.bin/make/hash.c index bd0fc56..e4036a9 100644 --- a/usr.bin/make/hash.c +++ b/usr.bin/make/hash.c @@ -164,11 +164,11 @@ Hash_DeleteTable(Hash_Table *t) *--------------------------------------------------------- */ Hash_Entry * -Hash_FindEntry(Hash_Table *t, char *key) +Hash_FindEntry(const Hash_Table *t, const char *key) { Hash_Entry *e; unsigned h; - char *p; + const char *p; for (h = 0, p = key; *p;) h = (h << 5) - h + *p++; @@ -198,11 +198,11 @@ Hash_FindEntry(Hash_Table *t, char *key) *--------------------------------------------------------- */ Hash_Entry * -Hash_CreateEntry(Hash_Table *t, char *key, Boolean *newPtr) +Hash_CreateEntry(Hash_Table *t, const char *key, Boolean *newPtr) { Hash_Entry *e; unsigned int h; - char *p; + const char *p; int keylen; struct Hash_Entry **hp; diff --git a/usr.bin/make/hash.h b/usr.bin/make/hash.h index 0e50ee2..7610554 100644 --- a/usr.bin/make/hash.h +++ b/usr.bin/make/hash.h @@ -97,8 +97,8 @@ typedef struct Hash_Search { void Hash_InitTable(Hash_Table *, int); void Hash_DeleteTable(Hash_Table *); -Hash_Entry *Hash_FindEntry(Hash_Table *, char *); -Hash_Entry *Hash_CreateEntry(Hash_Table *, char *, Boolean *); +Hash_Entry *Hash_FindEntry(const Hash_Table *, const char *); +Hash_Entry *Hash_CreateEntry(Hash_Table *, const char *, Boolean *); void Hash_DeleteEntry(Hash_Table *, Hash_Entry *); Hash_Entry *Hash_EnumFirst(Hash_Table *, Hash_Search *); Hash_Entry *Hash_EnumNext(Hash_Search *); |