nieco viac
This commit is contained in:
parent
328330c552
commit
34fa8cae4e
@ -27,13 +27,14 @@ void destroy_station(struct station* station){
|
||||
}
|
||||
|
||||
int select_track(struct station* station, const char* target){
|
||||
unsigned char *str;
|
||||
unsigned long
|
||||
hash(unsigned char *str)
|
||||
{
|
||||
unsigned long hash = 0;
|
||||
unsigned long hash = 5381;
|
||||
int c;
|
||||
|
||||
while (c = *str++)
|
||||
hash = c + (hash << 6) + (hash << 16) - hash;
|
||||
hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user