hash_name_to_8_3
};
+/***************************************************************
+ Compute a hash value based on a string key value.
+ The function returns the bucket index number for the hashed key.
+ JRA. Use a djb-algorithm hash for speed.
+***************************************************************/
+
+static unsigned int fast_string_hash(TDB_DATA *key)
+{
+ unsigned int n = 0;
+ const char *p;
+ for (p = (const char *)key->dptr; *p != '\0'; p++) {
+ n = ((n << 5) + n) ^ (unsigned int)(*p);
+ }
+ return n;
+}
+
/* return the methods for this mangling implementation */
const struct mangle_fns *mangle_hash_init(void)
{
const char *name);
void stat_cache_delete(const char *name);
struct TDB_DATA;
-unsigned int fast_string_hash(struct TDB_DATA *key);
bool reset_stat_cache( void );
/* The following definitions come from smbd/statvfs.c */
TALLOC_FREE(lname);
}
-/***************************************************************
- Compute a hash value based on a string key value.
- The function returns the bucket index number for the hashed key.
- JRA. Use a djb-algorithm hash for speed.
-***************************************************************/
-
-unsigned int fast_string_hash(TDB_DATA *key)
-{
- unsigned int n = 0;
- const char *p;
- for (p = (const char *)key->dptr; *p != '\0'; p++) {
- n = ((n << 5) + n) ^ (unsigned int)(*p);
- }
- return n;
-}
-
/***************************************************************************
Initializes or clears the stat cache.
**************************************************************************/