unsigned get_homedir_hash_value(char *name) { unsigned int hash = 0; if (name == NULL || name[0] == '\0') { log_error_time(); fprintf(stderr, "Attempt to hash NULL or empty string!\n"); return 0; } hash = boa_hash(name); hash %= PASSWD_HASHTABLE_SIZE; return hash; }
unsigned get_mime_hash_value(char *extension) { unsigned int hash = 0; if (extension == NULL || extension[0] == '\0') { log_error_time(); fprintf(stderr, "Attempt to hash NULL or empty string!\n"); return 0; } hash = boa_hash(extension); hash %= MIME_HASHTABLE_SIZE; return hash; }
static unsigned get_homedir_hash_value(const char *name) { return boa_hash(name) % PASSWD_HASHTABLE_SIZE; }
unsigned get_mime_hash_value(const char *extension) { return boa_hash(extension) % MIME_HASHTABLE_SIZE; }