From bc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 29 Mar 2007 09:35:51 +0000 Subject: r22009: change TDB_DATA from char * to unsigned char * and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f) --- source3/smbd/statcache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/smbd/statcache.c') diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c index 1a2b7a8237b..e257483f818 100644 --- a/source3/smbd/statcache.c +++ b/source3/smbd/statcache.c @@ -131,7 +131,7 @@ void stat_cache_add( const char *full_orig_name, const char *orig_translated_pat */ data_val.dsize = translated_path_length + 1; - data_val.dptr = translated_path; + data_val.dptr = (uint8 *)translated_path; if (tdb_store_bystring(tdb_stat_cache, original_path, data_val, TDB_REPLACE) != 0) { DEBUG(0,("stat_cache_add: Error storing entry %s -> %s\n", original_path, translated_path)); @@ -242,7 +242,7 @@ BOOL stat_cache_lookup(connection_struct *conn, pstring name, pstring dirpath, } } else { BOOL retval; - char *translated_path = data_val.dptr; + char *translated_path = (char *)data_val.dptr; size_t translated_path_length = data_val.dsize - 1; DEBUG(10,("stat_cache_lookup: lookup succeeded for name [%s] -> [%s]\n", chk_name, translated_path )); @@ -329,7 +329,7 @@ unsigned int fast_string_hash(TDB_DATA *key) { unsigned int n = 0; const char *p; - for (p = key->dptr; *p != '\0'; p++) { + for (p = (const char *)key->dptr; *p != '\0'; p++) { n = ((n << 5) + n) ^ (unsigned int)(*p); } return n; -- cgit