Add const to nick pointer passed to find_nicklist_in_channellist()

This commit is contained in:
Kevin Easton
2017-05-29 15:54:57 +10:00
parent 8f4b5600a5
commit fb35a00d1d
3 changed files with 5 additions and 5 deletions

View File

@@ -203,10 +203,10 @@ void BX_add_nicklist_to_channellist(NickList *nptr, ChannelList *cptr)
cptr->NickListTable[hvalue].hits++;
}
NickList *BX_find_nicklist_in_channellist(char *nick, ChannelList *cptr, int remove)
NickList *BX_find_nicklist_in_channellist(const char *nick, ChannelList *cptr, int remove)
{
HashEntry *location;
register NickList *tmp, *prev = NULL;
NickList *tmp, *prev = NULL;
unsigned long hvalue = hash_nickname(nick, NICKLIST_HASHSIZE);
if (!cptr)
@@ -217,7 +217,7 @@ NickList *BX_find_nicklist_in_channellist(char *nick, ChannelList *cptr, int rem
* as regular linked list, or as ircd likes to say...
* "We found the bucket, now search the chain"
*/
for (tmp = (NickList *) location->list; tmp; prev = tmp, tmp = tmp->next)
for (tmp = location->list; tmp; prev = tmp, tmp = tmp->next)
{
if (!my_stricmp(nick, tmp->nick))
{