Add const to nick pointer passed to find_nicklist_in_channellist()
This commit is contained in:
@@ -31,7 +31,7 @@ int BX_remove_oldest_whowas_hashlist (WhowasWrapList *, time_t, int);
|
||||
|
||||
WhowasList *BX_next_userhost(WhowasWrapList *, WhowasList *);
|
||||
|
||||
NickList *BX_find_nicklist_in_channellist(char *, ChannelList *, int);
|
||||
NickList *BX_find_nicklist_in_channellist(const char *, ChannelList *, int);
|
||||
NickList *BX_next_nicklist(ChannelList *, NickList *);
|
||||
|
||||
void clear_nicklist_hashtable(ChannelList *);
|
||||
|
||||
@@ -431,7 +431,7 @@ extern Function_ptr *global;
|
||||
#define lookup_channel (*(ChannelList *(*)(const char *, int, int))global[LOOKUP_CHANNEL])
|
||||
|
||||
/* hash.c */
|
||||
#define find_nicklist_in_channellist (*(NickList *(*)(char *, ChannelList *, int))global[FIND_NICKLIST_IN_CHANNELLIST])
|
||||
#define find_nicklist_in_channellist (*(NickList *(*)(const char *, ChannelList *, int))global[FIND_NICKLIST_IN_CHANNELLIST])
|
||||
#define add_nicklist_to_channellist (*(void (*)(NickList *, ChannelList *))global[ADD_NICKLIST_TO_CHANNELLIST])
|
||||
#define next_nicklist (*(NickList *(*)(ChannelList *, NickList *))global[NEXT_NICKLIST])
|
||||
#define next_namelist (*(List *(*)(HashEntry *, List *, unsigned int))global[NEXT_NAMELIST])
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user