Change hash_nickname() to take a const char * argument
This commit is contained in:
@@ -61,7 +61,7 @@ void BX_clear_sorted_nicklist(NickList **);
|
|||||||
Flooding *BX_find_name_in_floodlist(char *, char *, HashEntry *, unsigned int, int);
|
Flooding *BX_find_name_in_floodlist(char *, char *, HashEntry *, unsigned int, int);
|
||||||
Flooding *BX_add_name_to_floodlist(char *, char *, char *, HashEntry *, unsigned int);
|
Flooding *BX_add_name_to_floodlist(char *, char *, char *, HashEntry *, unsigned int);
|
||||||
|
|
||||||
unsigned long hash_nickname(char *, unsigned int);
|
unsigned long hash_nickname(const char *, unsigned int);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ CVS_REVISION(hash_c)
|
|||||||
* nick by counting up the ascii values of the lower case, and
|
* nick by counting up the ascii values of the lower case, and
|
||||||
* then %'ing it by NICKLIST_HASHSIZE (always a prime!)
|
* then %'ing it by NICKLIST_HASHSIZE (always a prime!)
|
||||||
*/
|
*/
|
||||||
unsigned long hash_nickname(char *nick, unsigned int size)
|
unsigned long hash_nickname(const char *nick, unsigned int size)
|
||||||
{
|
{
|
||||||
register u_char *p = (u_char *) nick;
|
const unsigned char *p = (const unsigned char *)nick;
|
||||||
unsigned long hash = 0, g;
|
unsigned long hash = 0, g;
|
||||||
if (!nick) return -1;
|
if (!nick) return -1;
|
||||||
while (*p)
|
while (*p)
|
||||||
|
|||||||
Reference in New Issue
Block a user