MyFree -> rb_free

This commit is contained in:
Valery Yatsko 2008-04-02 02:45:16 +04:00
parent 81af5bcb39
commit bd19829278
20 changed files with 144 additions and 144 deletions

View file

@ -399,7 +399,7 @@ ms_join(struct Client *client_p, struct Client *source_p, int parc, const char *
int isnew;
int keep_our_modes = YES;
int keep_new_modes = YES;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
/* special case for join 0 */
if((parv[1][0] == '0') && (parv[1][1] == '\0') && parc == 2)
@ -469,7 +469,7 @@ ms_join(struct Client *client_p, struct Client *source_p, int parc, const char *
set_final_mode(&mode, &chptr->mode);
chptr->mode = mode;
remove_our_modes(chptr, source_p);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->invites.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, chptr->invites.head)
{
del_invite(chptr, ptr->data);
}

View file

@ -545,9 +545,9 @@ static void
expire_tgchange(void *unused)
{
tgchange *target;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, tgchange_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, tgchange_list.head)
{
target = ptr->data;
@ -555,8 +555,8 @@ expire_tgchange(void *unused)
{
rb_dlinkDelete(ptr, &tgchange_list);
rb_patricia_remove(tgchange_tree, target->pnode);
MyFree(target->ip);
MyFree(target);
rb_free(target->ip);
rb_free(target);
}
}
}

View file

@ -759,7 +759,7 @@ change_local_nick(struct Client *client_p, struct Client *source_p,
char *nick, int dosend)
{
struct Client *target_p;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
struct Channel *chptr;
char note[NICKLEN + 10];
int samenick;
@ -843,7 +843,7 @@ change_local_nick(struct Client *client_p, struct Client *source_p,
* to clear a clients own list of accepted clients. So just remove
* them from everyone elses list --anfl
*/
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, source_p->on_allow_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, source_p->on_allow_list.head)
{
target_p = ptr->data;

View file

@ -104,7 +104,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
char *p;
int i, joinc = 0, timeslice = 0;
static char empty[] = "";
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
if(!IsChannelName(parv[2]) || !check_channel_name(parv[2]))
return 0;
@ -268,7 +268,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
rb_dlink_list_length(&chptr->invexlist) +
rb_dlink_list_length(&chptr->quietlist);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->locmembers.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, chptr->locmembers.head)
{
msptr = ptr->data;
who = msptr->client_p;
@ -342,7 +342,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
if(!keep_our_modes)
{
remove_our_modes(chptr, fakesource_p);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->invites.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, chptr->invites.head)
{
del_invite(chptr, ptr->data);
}
@ -836,7 +836,7 @@ remove_ban_list(struct Channel *chptr, struct Client *source_p,
static char lparabuf[BUFSIZE];
struct Ban *banptr;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
char *pbuf;
int count = 0;
int cur_len, mlen, plen;
@ -846,7 +846,7 @@ remove_ban_list(struct Channel *chptr, struct Client *source_p,
cur_len = mlen = rb_sprintf(lmodebuf, ":%s MODE %s -", source_p->name, chptr->chname);
mbuf = lmodebuf + mlen;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, list->head)
{
banptr = ptr->data;

View file

@ -108,12 +108,12 @@ static void
rehash_glines(struct Client *source_p)
{
struct ConfItem *aconf;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing G-lines",
get_oper_name(source_p));
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, glines.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, glines.head)
{
aconf = ptr->data;
@ -127,12 +127,12 @@ rehash_pglines(struct Client *source_p)
{
struct gline_pending *glp_ptr;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing pending glines",
get_oper_name(source_p));
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, pending_glines.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, pending_glines.head)
{
glp_ptr = ptr->data;
@ -147,7 +147,7 @@ static void
rehash_tklines(struct Client *source_p)
{
struct ConfItem *aconf;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
int i;
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing temp klines",
@ -155,7 +155,7 @@ rehash_tklines(struct Client *source_p)
for(i = 0; i < LAST_TEMP_TYPE; i++)
{
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, temp_klines[i].head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, temp_klines[i].head)
{
aconf = ptr->data;
@ -169,7 +169,7 @@ static void
rehash_tdlines(struct Client *source_p)
{
struct ConfItem *aconf;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
int i;
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing temp dlines",
@ -177,7 +177,7 @@ rehash_tdlines(struct Client *source_p)
for(i = 0; i < LAST_TEMP_TYPE; i++)
{
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, temp_dlines[i].head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, temp_dlines[i].head)
{
aconf = ptr->data;
@ -192,12 +192,12 @@ rehash_txlines(struct Client *source_p)
{
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing temp xlines",
get_oper_name(source_p));
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, xline_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, xline_conf_list.head)
{
aconf = ptr->data;
@ -214,13 +214,13 @@ rehash_tresvs(struct Client *source_p)
{
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
int i;
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing temp resvs",
get_oper_name(source_p));
HASH_WALK_SAFE(i, R_MAX, ptr, next_ptr, resvTable)
HASH_WALK_SAFE(i, R_MAX, ptr, rb_free(, resvTable)
{
aconf = ptr->data;
@ -232,7 +232,7 @@ rehash_tresvs(struct Client *source_p)
}
HASH_WALK_END
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, resv_conf_list.head)
{
aconf = ptr->data;

View file

@ -190,12 +190,12 @@ void lookup_blacklists(struct Client *client_p)
void abort_blacklist_queries(struct Client *client_p)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
struct BlacklistClient *blcptr;
if (client_p->preClient == NULL)
return;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->preClient->dnsbl_queries.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, client_p->preClient->dnsbl_queries.head)
{
blcptr = ptr->data;
rb_dlinkDelete(&blcptr->node, &client_p->preClient->dnsbl_queries);
@ -207,10 +207,10 @@ void abort_blacklist_queries(struct Client *client_p)
void destroy_blacklists(void)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
struct Blacklist *blptr;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, blacklist_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, blacklist_list.head)
{
blptr = ptr->data;
blptr->hits = 0; /* keep it simple and consistent */

View file

@ -143,12 +143,12 @@ void
free_cachefile(struct cachefile *cacheptr)
{
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
if(cacheptr == NULL)
return;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, cacheptr->contents.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, cacheptr->contents.head)
{
BlockHeapFree(cacheline_heap, ptr->data);
}

View file

@ -264,12 +264,12 @@ remove_user_from_channels(struct Client *client_p)
struct Channel *chptr;
struct membership *msptr;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
if(client_p == NULL)
return;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->user->channel.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, client_p->user->channel.head)
{
msptr = ptr->data;
chptr = msptr->chptr;
@ -347,10 +347,10 @@ void
free_channel_list(rb_dlink_list * list)
{
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
struct Ban *actualBan;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, list->head)
{
actualBan = ptr->data;
free_ban(actualBan);
@ -369,9 +369,9 @@ free_channel_list(rb_dlink_list * list)
void
destroy_channel(struct Channel *chptr)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->invites.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, chptr->invites.head)
{
del_invite(chptr, ptr->data);
}

View file

@ -246,9 +246,9 @@ check_class()
{
struct Class *cltmp;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, class_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, class_list.head)
{
cltmp = ptr->data;

View file

@ -292,9 +292,9 @@ check_pings_list(rb_dlink_list * list)
char scratch[32]; /* way too generous but... */
struct Client *client_p; /* current local client_p being examined */
int ping = 0; /* ping time value from client */
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, list->head)
{
client_p = ptr->data;
@ -356,11 +356,11 @@ check_pings_list(rb_dlink_list * list)
static void
check_unknowns_list(rb_dlink_list * list)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
struct Client *client_p;
int timeout;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, list->head)
{
client_p = ptr->data;
@ -443,9 +443,9 @@ check_banned_lines(void)
{
struct Client *client_p; /* current local client_p being examined */
struct ConfItem *aconf = NULL;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
{
client_p = ptr->data;
@ -533,7 +533,7 @@ check_banned_lines(void)
}
/* also check the unknowns list for new dlines */
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, unknown_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, unknown_list.head)
{
client_p = ptr->data;
@ -573,9 +573,9 @@ check_klines(void)
struct Client *client_p;
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
{
client_p = ptr->data;
@ -614,9 +614,9 @@ check_glines(void)
struct Client *client_p;
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
{
client_p = ptr->data;
@ -663,9 +663,9 @@ check_dlines(void)
struct Client *client_p;
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
{
client_p = ptr->data;
@ -687,7 +687,7 @@ check_dlines(void)
}
/* dlines need to be checked against unknowns too */
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, unknown_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, unknown_list.head)
{
client_p = ptr->data;
@ -713,9 +713,9 @@ check_xlines(void)
struct Client *client_p;
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
{
client_p = ptr->data;
@ -1321,7 +1321,7 @@ static inline void
exit_generic_client(struct Client *client_p, struct Client *source_p, struct Client *from,
const char *comment)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
if(IsOper(source_p))
rb_dlinkFindDestroy(source_p, &oper_list);
@ -1336,7 +1336,7 @@ exit_generic_client(struct Client *client_p, struct Client *source_p, struct Cli
s_assert(source_p->user->channel.head == NULL);
/* Clean up invitefield */
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, source_p->user->invited.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, source_p->user->invited.head)
{
del_invite(ptr->data, source_p);
}
@ -1756,7 +1756,7 @@ void
del_all_accepts(struct Client *client_p)
{
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
struct Client *target_p;
if(MyClient(client_p) && client_p->localClient->allow_list.head)
@ -1764,7 +1764,7 @@ del_all_accepts(struct Client *client_p)
/* clear this clients accept list, and remove them from
* everyones on_accept_list
*/
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->allow_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, client_p->localClient->allow_list.head)
{
target_p = ptr->data;
rb_dlinkFindDestroy(client_p, &target_p->on_allow_list);
@ -1773,7 +1773,7 @@ del_all_accepts(struct Client *client_p)
}
/* remove this client from everyones accept list */
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->on_allow_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, client_p->on_allow_list.head)
{
target_p = ptr->data;
rb_dlinkFindDestroy(client_p, &target_p->localClient->allow_list);

View file

@ -643,10 +643,10 @@ clear_resv_hash(void)
{
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
int i;
HASH_WALK_SAFE(i, R_MAX, ptr, next_ptr, resvTable)
HASH_WALK_SAFE(i, R_MAX, ptr, rb_free(, resvTable)
{
aconf = ptr->data;

View file

@ -179,9 +179,9 @@ mod_add_path(const char *path)
void
mod_clear_paths(void)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, mod_paths.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, mod_paths.head)
{
MyFree(ptr->data);
free_rb_dlink_node(ptr);

View file

@ -129,9 +129,9 @@ void
clear_monitor(struct Client *client_p)
{
struct monitor *monptr;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->monitor_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, client_p->localClient->monitor_list.head)
{
monptr = ptr->data;
@ -150,22 +150,22 @@ static void
cleanup_monitor(void *unused)
{
struct monitor *last_ptr = NULL;
struct monitor *next_ptr, *ptr;
struct monitor *rb_free(, *ptr;
int i;
for(i = 0; i < MONITOR_HASH_SIZE; i++)
{
last_ptr = NULL;
for(ptr = monitorTable[i]; ptr; ptr = next_ptr)
for(ptr = monitorTable[i]; ptr; ptr = rb_free()
{
next_ptr = ptr->hnext;
rb_free( = ptr->hnext;
if(!rb_dlink_list_length(&ptr->users))
{
if(last_ptr)
last_ptr->hnext = next_ptr;
last_ptr->hnext = rb_free(;
else
monitorTable[i] = next_ptr;
monitorTable[i] = rb_free(;
BlockHeapFree(monitor_heap, ptr);
}

View file

@ -449,7 +449,7 @@ static int
conf_begin_oper(struct TopConf *tc)
{
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
if(yy_oper != NULL)
{
@ -457,7 +457,7 @@ conf_begin_oper(struct TopConf *tc)
yy_oper = NULL;
}
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_oper_list.head)
{
free_oper_conf(ptr->data);
rb_dlinkDestroy(ptr, &yy_oper_list);
@ -474,7 +474,7 @@ conf_end_oper(struct TopConf *tc)
{
struct oper_conf *yy_tmpoper;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
if(conf_cur_block_name != NULL)
{
@ -505,7 +505,7 @@ conf_end_oper(struct TopConf *tc)
* and host in, yy_oper contains the rest of the information which
* we need to copy into each element in yy_oper_list
*/
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_oper_list.head)
{
yy_tmpoper = ptr->data;
@ -791,12 +791,12 @@ static int
conf_begin_auth(struct TopConf *tc)
{
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
if(yy_aconf)
free_conf(yy_aconf);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_aconf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_aconf_list.head)
{
free_conf(ptr->data);
rb_dlinkDestroy(ptr, &yy_aconf_list);
@ -813,7 +813,7 @@ conf_end_auth(struct TopConf *tc)
{
struct ConfItem *yy_tmp;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
if(EmptyString(yy_aconf->name))
DupString(yy_aconf->name, "NOMATCH");
@ -831,7 +831,7 @@ conf_end_auth(struct TopConf *tc)
conf_add_class_to_conf(yy_aconf);
add_conf_by_address(yy_aconf->host, CONF_CLIENT, yy_aconf->user, yy_aconf);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_aconf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_aconf_list.head)
{
yy_tmp = ptr->data;
@ -1001,9 +1001,9 @@ conf_set_auth_class(void *data)
static int
conf_cleanup_shared(struct TopConf *tc)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_shared_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_shared_list.head)
{
free_remote_conf(ptr->data);
rb_dlinkDestroy(ptr, &yy_shared_list);
@ -1078,14 +1078,14 @@ conf_set_shared_flags(void *data)
{
conf_parm_t *args = data;
int flags = 0;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
if(yy_shared != NULL)
free_remote_conf(yy_shared);
set_modes_from_table(&flags, "flag", shared_table, args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_shared_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_shared_list.head)
{
yy_shared = ptr->data;
@ -1300,9 +1300,9 @@ conf_set_exempt_ip(void *data)
static int
conf_cleanup_cluster(struct TopConf *tc)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_cluster_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_cluster_list.head)
{
free_remote_conf(ptr->data);
rb_dlinkDestroy(ptr, &yy_cluster_list);
@ -1335,14 +1335,14 @@ conf_set_cluster_flags(void *data)
{
conf_parm_t *args = data;
int flags = 0;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
if(yy_shared != NULL)
free_remote_conf(yy_shared);
set_modes_from_table(&flags, "flag", cluster_table, args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_cluster_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_cluster_list.head)
{
yy_shared = ptr->data;
yy_shared->flags = flags;

View file

@ -172,12 +172,12 @@ static int res_ourserver(const struct irc_sockaddr_storage *inp)
static time_t timeout_query_list(time_t now)
{
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
struct reslist *request;
time_t next_time = 0;
time_t timeout = 0;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, request_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, request_list.head)
{
request = ptr->data;
timeout = request->sentat + request->timeout;
@ -317,10 +317,10 @@ static struct reslist *make_request(struct DNSQuery *query)
void delete_resolver_queries(const struct DNSQuery *query)
{
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
struct reslist *request;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, request_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, request_list.head)
{
if ((request = ptr->data) != NULL)
{

View file

@ -426,10 +426,10 @@ static void
timeout_auth_queries_event(void *notused)
{
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
struct AuthRequest *auth;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, auth_poll_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, auth_poll_list.head)
{
auth = ptr->data;

View file

@ -1005,10 +1005,10 @@ static void
expire_temp_kd(void *list)
{
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
struct ConfItem *aconf;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, ((rb_dlink_list *) list)->head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, ((rb_dlink_list *) list)->head)
{
aconf = ptr->data;
@ -1031,9 +1031,9 @@ static void
reorganise_temp_kd(void *list)
{
struct ConfItem *aconf;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, ((rb_dlink_list *) list)->head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, ((rb_dlink_list *) list)->head)
{
aconf = ptr->data;
@ -1210,7 +1210,7 @@ clear_out_old_conf(void)
{
struct Class *cltmp;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
/*
* don't delete the class table, rather mark all entries
@ -1260,7 +1260,7 @@ clear_out_old_conf(void)
MyFree(ConfigFileEntry.servlink_path);
ConfigFileEntry.servlink_path = NULL;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, service_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, service_list.head)
{
MyFree(ptr->data);
rb_dlinkDestroy(ptr, &service_list);

View file

@ -77,34 +77,34 @@ clear_s_newconf(void)
{
struct server_conf *server_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, shared_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, shared_conf_list.head)
{
/* ptr here is ptr->data->node */
rb_dlinkDelete(ptr, &shared_conf_list);
free_remote_conf(ptr->data);
}
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, cluster_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, cluster_conf_list.head)
{
rb_dlinkDelete(ptr, &cluster_conf_list);
free_remote_conf(ptr->data);
}
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, hubleaf_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, hubleaf_conf_list.head)
{
rb_dlinkDelete(ptr, &hubleaf_conf_list);
free_remote_conf(ptr->data);
}
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, oper_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, oper_conf_list.head)
{
free_oper_conf(ptr->data);
rb_dlinkDestroy(ptr, &oper_conf_list);
}
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, server_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, server_conf_list.head)
{
server_p = ptr->data;
@ -122,9 +122,9 @@ void
clear_s_newconf_bans(void)
{
struct ConfItem *aconf;
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, xline_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, xline_conf_list.head)
{
aconf = ptr->data;
@ -135,7 +135,7 @@ clear_s_newconf_bans(void)
rb_dlinkDestroy(ptr, &xline_conf_list);
}
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, resv_conf_list.head)
{
aconf = ptr->data;
@ -686,10 +686,10 @@ expire_temp_rxlines(void *unused)
{
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
int i;
HASH_WALK_SAFE(i, R_MAX, ptr, next_ptr, resvTable)
HASH_WALK_SAFE(i, R_MAX, ptr, rb_free(, resvTable)
{
aconf = ptr->data;
@ -706,7 +706,7 @@ expire_temp_rxlines(void *unused)
}
HASH_WALK_END
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, resv_conf_list.head)
{
aconf = ptr->data;
@ -721,7 +721,7 @@ expire_temp_rxlines(void *unused)
}
}
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, xline_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, xline_conf_list.head)
{
aconf = ptr->data;
@ -776,9 +776,9 @@ expire_nd_entries(void *unused)
{
struct nd_entry *nd;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, nd_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, nd_list.head)
{
nd = ptr->data;

View file

@ -453,7 +453,7 @@ sendto_server(struct Client *one, struct Channel *chptr, unsigned long caps,
va_list args;
struct Client *target_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
buf_head_t linebuf;
/* noone to send to.. */
@ -468,7 +468,7 @@ sendto_server(struct Client *one, struct Channel *chptr, unsigned long caps,
rb_linebuf_putmsg(&linebuf, format, &args, NULL);
va_end(args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, serv_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, serv_list.head)
{
target_p = ptr->data;
@ -509,7 +509,7 @@ sendto_channel_flags(struct Client *one, int type, struct Client *source_p,
struct Client *target_p;
struct membership *msptr;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
rb_linebuf_newbuf(&rb_linebuf_local);
rb_linebuf_newbuf(&rb_linebuf_name);
@ -533,7 +533,7 @@ sendto_channel_flags(struct Client *one, int type, struct Client *source_p,
rb_linebuf_putmsg(&rb_linebuf_name, NULL, NULL, ":%s %s", source_p->name, buf);
rb_linebuf_putmsg(&rb_linebuf_id, NULL, NULL, ":%s %s", use_id(source_p), buf);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->members.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, chptr->members.head)
{
msptr = ptr->data;
target_p = msptr->client_p;
@ -589,7 +589,7 @@ sendto_channel_local(int type, struct Channel *chptr, const char *pattern, ...)
struct membership *msptr;
struct Client *target_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
rb_linebuf_newbuf(&linebuf);
@ -597,7 +597,7 @@ sendto_channel_local(int type, struct Channel *chptr, const char *pattern, ...)
rb_linebuf_putmsg(&linebuf, pattern, &args, NULL);
va_end(args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->locmembers.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, chptr->locmembers.head)
{
msptr = ptr->data;
target_p = msptr->client_p;
@ -629,7 +629,7 @@ sendto_channel_local_butone(struct Client *one, int type, struct Channel *chptr,
struct membership *msptr;
struct Client *target_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
rb_linebuf_newbuf(&linebuf);
@ -637,7 +637,7 @@ sendto_channel_local_butone(struct Client *one, int type, struct Channel *chptr,
rb_linebuf_putmsg(&linebuf, pattern, &args, NULL);
va_end(args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->locmembers.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, chptr->locmembers.head)
{
msptr = ptr->data;
target_p = msptr->client_p;
@ -672,7 +672,7 @@ sendto_common_channels_local(struct Client *user, const char *pattern, ...)
{
va_list args;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *uptr;
rb_dlink_node *next_uptr;
struct Channel *chptr;
@ -688,7 +688,7 @@ sendto_common_channels_local(struct Client *user, const char *pattern, ...)
++current_serial;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, user->user->channel.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, user->user->channel.head)
{
mscptr = ptr->data;
chptr = mscptr->chptr;
@ -730,7 +730,7 @@ sendto_common_channels_local_butone(struct Client *user, const char *pattern, ..
{
va_list args;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *uptr;
rb_dlink_node *next_uptr;
struct Channel *chptr;
@ -748,7 +748,7 @@ sendto_common_channels_local_butone(struct Client *user, const char *pattern, ..
/* Skip them -- jilles */
user->serial = current_serial;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, user->user->channel.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, user->user->channel.head)
{
mscptr = ptr->data;
chptr = mscptr->chptr;
@ -784,7 +784,7 @@ sendto_match_butone(struct Client *one, struct Client *source_p,
va_list args;
struct Client *target_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
buf_head_t rb_linebuf_local;
buf_head_t rb_linebuf_name;
buf_head_t rb_linebuf_id;
@ -811,7 +811,7 @@ sendto_match_butone(struct Client *one, struct Client *source_p,
if(what == MATCH_HOST)
{
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
{
target_p = ptr->data;
@ -822,7 +822,7 @@ sendto_match_butone(struct Client *one, struct Client *source_p,
/* what = MATCH_SERVER, if it doesnt match us, just send remote */
else if(match(mask, me.name))
{
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
{
target_p = ptr->data;
_send_linebuf(target_p, &rb_linebuf_local);
@ -929,7 +929,7 @@ sendto_monitor(struct monitor *monptr, const char *pattern, ...)
buf_head_t linebuf;
struct Client *target_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
rb_linebuf_newbuf(&linebuf);
@ -937,7 +937,7 @@ sendto_monitor(struct monitor *monptr, const char *pattern, ...)
rb_linebuf_putmsg(&linebuf, pattern, &args, NULL);
va_end(args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, monptr->users.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, monptr->users.head)
{
target_p = ptr->data;
@ -1005,7 +1005,7 @@ sendto_realops_flags(int flags, int level, const char *pattern, ...)
{
struct Client *client_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
va_list args;
buf_head_t linebuf;
@ -1016,7 +1016,7 @@ sendto_realops_flags(int flags, int level, const char *pattern, ...)
":%s NOTICE * :*** Notice -- ", me.name);
va_end(args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, local_oper_list.head)
{
client_p = ptr->data;
@ -1047,7 +1047,7 @@ sendto_realops_snomask(int flags, int level, const char *pattern, ...)
char *snobuf;
struct Client *client_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
va_list args;
buf_head_t linebuf;
@ -1083,7 +1083,7 @@ sendto_realops_snomask(int flags, int level, const char *pattern, ...)
}
level &= ~L_NETWIDE;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, local_oper_list.head)
{
client_p = ptr->data;
@ -1112,7 +1112,7 @@ sendto_realops_snomask_from(int flags, int level, struct Client *source_p,
{
struct Client *client_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
va_list args;
buf_head_t linebuf;
@ -1123,7 +1123,7 @@ sendto_realops_snomask_from(int flags, int level, struct Client *source_p,
":%s NOTICE * :*** Notice -- ", source_p->name);
va_end(args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, local_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, local_oper_list.head)
{
client_p = ptr->data;
@ -1155,7 +1155,7 @@ sendto_wallops_flags(int flags, struct Client *source_p, const char *pattern, ..
{
struct Client *client_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
va_list args;
buf_head_t linebuf;
@ -1172,7 +1172,7 @@ sendto_wallops_flags(int flags, struct Client *source_p, const char *pattern, ..
va_end(args);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, IsPerson(source_p) && flags == UMODE_WALLOP ? lclient_list.head : local_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, IsPerson(source_p) && flags == UMODE_WALLOP ? lclient_list.head : local_oper_list.head)
{
client_p = ptr->data;
@ -1225,7 +1225,7 @@ kill_client_serv_butone(struct Client *one, struct Client *target_p, const char
va_list args;
struct Client *client_p;
rb_dlink_node *ptr;
rb_dlink_node *next_ptr;
rb_dlink_node *rb_free(;
buf_head_t rb_linebuf_id;
buf_head_t rb_linebuf_name;
@ -1241,7 +1241,7 @@ kill_client_serv_butone(struct Client *one, struct Client *target_p, const char
rb_linebuf_putmsg(&rb_linebuf_id, NULL, NULL, ":%s KILL %s :%s",
use_id(&me), use_id(target_p), buf);
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, serv_list.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, serv_list.head)
{
client_p = ptr->data;

View file

@ -113,10 +113,10 @@ add_isupport(const char *name, const char *(*func)(const void *), const void *pa
void
delete_isupport(const char *name)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *rb_free(;
struct isupportitem *item;
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, isupportlist.head)
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, isupportlist.head)
{
item = ptr->data;