From c25294ad3ba1252a0d77bf63a27758a0eee4259e Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 9 Apr 2006 22:09:24 +0000 Subject: Another round of cleanups: - Add more warnings. - Rename variables that mask out-scope vars with the same name. - Remove all casts of return values from xmalloc, xrealloc, and alloca. - Remove casts of the first argument to xrealloc. - Convert all bcopy/bzero/bcmp invocations to use memcp/memmove/memset/memcmp. --- strcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'strcache.c') diff --git a/strcache.c b/strcache.c index 6cfae42..33dcaf1 100644 --- a/strcache.c +++ b/strcache.c @@ -43,7 +43,7 @@ static struct strcache * new_cache() { struct strcache *new; - new = (struct strcache *) xmalloc (sizeof (*new) + bufsize); + new = xmalloc (sizeof (*new) + bufsize); new->end = new->buffer; new->count = 0; new->bytesfree = bufsize; @@ -118,7 +118,7 @@ static const char * add_hash (const char *str, int len) { /* Look up the string in the hash. If it's there, return it. */ - char **slot = (char **) hash_find_slot (&strings, str); + char *const *slot = (char *const *) hash_find_slot (&strings, str); const char *key = *slot; if (!HASH_VACANT (key)) -- cgit v1.2.3