Argh, wrong replace caused by MS VS 2005 interface.

This commit is contained in:
Valery Yatsko 2008-04-02 02:47:17 +04:00
parent bd19829278
commit 637c4932f6
37 changed files with 282 additions and 282 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
/* 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, rb_free(, chptr->invites.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, tgchange_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, tgchange_list.head)
{
target = ptr->data;

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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
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, rb_free(, source_p->on_allow_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
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, rb_free(, chptr->locmembers.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, rb_free(, chptr->invites.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, list->head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
{
banptr = ptr->data;

View file

@ -91,7 +91,7 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p
":%s AWAY", use_id(source_p));
sendto_server(client_p, NULL, NOCAPS, CAP_TS6,
":%s AWAY", source_p->name);
MyFree(away);
rb_free(away);
source_p->user->away = NULL;
}
if(MyConnect(source_p))
@ -127,7 +127,7 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p
":%s AWAY :%s", source_p->name, awy2);
}
else
MyFree(away);
rb_free(away);
DupString(away, awy2);

View file

@ -78,7 +78,7 @@ mr_capab(struct Client *client_p, struct Client *source_p, int parc, const char
else
client_p->localClient->caps |= CAP_CAP;
MyFree(client_p->localClient->fullcaps);
rb_free(client_p->localClient->fullcaps);
DupString(client_p->localClient->fullcaps, parv[1]);
for (i = 1; i < parc; i++)
@ -116,7 +116,7 @@ me_gcap(struct Client *client_p, struct Client *source_p,
if(!EmptyString(source_p->serv->fullcaps))
{
source_p->serv->caps = 0;
MyFree(source_p->serv->fullcaps);
rb_free(source_p->serv->fullcaps);
}
DupString(source_p->serv->fullcaps, parv[1]);

View file

@ -91,8 +91,8 @@ cleanup_challenge(struct Client *target_p)
if(target_p->localClient == NULL)
return;
MyFree(target_p->localClient->challenge);
MyFree(target_p->localClient->opername);
rb_free(target_p->localClient->challenge);
rb_free(target_p->localClient->opername);
target_p->localClient->challenge = NULL;
target_p->localClient->opername = NULL;
target_p->localClient->chal_time = 0;
@ -160,12 +160,12 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
source_p->name, source_p->username,
source_p->host);
MyFree(b_response);
rb_free(b_response);
cleanup_challenge(source_p);
return 0;
}
MyFree(b_response);
rb_free(b_response);
oper_p = find_oper_conf(source_p->username, source_p->orighost,
source_p->sockhost,
@ -239,7 +239,7 @@ m_challenge(struct Client *client_p, struct Client *source_p, int parc, const ch
}
sendto_one(source_p, form_str(RPL_ENDOFRSACHALLENGE2),
me.name, source_p->name);
MyFree(challenge);
rb_free(challenge);
DupString(source_p->localClient->opername, oper_p->name);
}
else
@ -296,11 +296,11 @@ generate_challenge(char **r_challenge, char **r_response, RSA * rsa)
if (ret >= 0)
{
*r_challenge = (char *)ircd_base64_encode(tmp, ret);
MyFree(tmp);
rb_free(tmp);
return 0;
}
MyFree(tmp);
MyFree(*r_response);
rb_free(tmp);
rb_free(*r_response);
*r_response = NULL;
}

View file

@ -283,7 +283,7 @@ static void safelist_client_release(struct Client *client_p)
rb_dlinkFindDestroy(client_p, &safelisting_clients);
MyFree(client_p->localClient->safelist_data);
rb_free(client_p->localClient->safelist_data);
client_p->localClient->safelist_data = NULL;

View file

@ -64,7 +64,7 @@ mr_pass(struct Client *client_p, struct Client *source_p, int parc, const char *
{
memset(client_p->localClient->passwd, 0,
strlen(client_p->localClient->passwd));
MyFree(client_p->localClient->passwd);
rb_free(client_p->localClient->passwd);
}
DupNString(client_p->localClient->passwd, parv[1], PASSWDLEN);

View file

@ -108,12 +108,12 @@ static void
rehash_glines(struct Client *source_p)
{
struct ConfItem *aconf;
rb_dlink_node *ptr, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing G-lines",
get_oper_name(source_p));
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, glines.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, glines.head)
{
aconf = ptr->data;
@ -127,18 +127,18 @@ rehash_pglines(struct Client *source_p)
{
struct gline_pending *glp_ptr;
rb_dlink_node *ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *next_ptr;
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing pending glines",
get_oper_name(source_p));
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, pending_glines.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, pending_glines.head)
{
glp_ptr = ptr->data;
MyFree(glp_ptr->reason1);
MyFree(glp_ptr->reason2);
MyFree(glp_ptr);
rb_free(glp_ptr->reason1);
rb_free(glp_ptr->reason2);
rb_free(glp_ptr);
rb_dlinkDestroy(ptr, &pending_glines);
}
}
@ -147,7 +147,7 @@ static void
rehash_tklines(struct Client *source_p)
{
struct ConfItem *aconf;
rb_dlink_node *ptr, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
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, rb_free(, temp_klines[i].head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
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, rb_free(, temp_dlines[i].head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s is clearing temp xlines",
get_oper_name(source_p));
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, xline_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, resvTable)
HASH_WALK_SAFE(i, R_MAX, ptr, next_ptr, resvTable)
{
aconf = ptr->data;
@ -232,7 +232,7 @@ rehash_tresvs(struct Client *source_p)
}
HASH_WALK_END
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, resv_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head)
{
aconf = ptr->data;

View file

@ -73,7 +73,7 @@ mr_user(struct Client *client_p, struct Client *source_p, int parc, const char *
*p = '\0';
rb_snprintf(buf, sizeof(buf), "%s %s", parv[2], parv[3]);
MyFree(source_p->localClient->fullcaps);
rb_free(source_p->localClient->fullcaps);
DupString(source_p->localClient->fullcaps, buf);
do_local_user(client_p, source_p, parv[1], parv[4]);

View file

@ -72,7 +72,7 @@ static void blacklist_dns_callback(void *vptr, struct DNSReply *reply)
{
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"blacklist_dns_callback(): blcptr->client_p->preClient (%s) is NULL", get_client_name(blcptr->client_p, HIDE_IP));
MyFree(blcptr);
rb_free(blcptr);
return;
}
@ -110,7 +110,7 @@ static void blacklist_dns_callback(void *vptr, struct DNSReply *reply)
register_local_user(blcptr->client_p, blcptr->client_p, buf);
}
MyFree(blcptr);
rb_free(blcptr);
}
/* XXX: no IPv6 implementation, not to concerned right now though. */
@ -167,7 +167,7 @@ void unref_blacklist(struct Blacklist *blptr)
if (blptr->status & CONF_ILLEGAL && blptr->refcount <= 0)
{
rb_dlinkFindDestroy(blptr, &blacklist_list);
MyFree(blptr);
rb_free(blptr);
}
}
@ -190,27 +190,27 @@ void lookup_blacklists(struct Client *client_p)
void abort_blacklist_queries(struct Client *client_p)
{
rb_dlink_node *ptr, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
struct BlacklistClient *blcptr;
if (client_p->preClient == NULL)
return;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, client_p->preClient->dnsbl_queries.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->preClient->dnsbl_queries.head)
{
blcptr = ptr->data;
rb_dlinkDelete(&blcptr->node, &client_p->preClient->dnsbl_queries);
unref_blacklist(blcptr->blacklist);
delete_resolver_queries(&blcptr->dns_query);
MyFree(blcptr);
rb_free(blcptr);
}
}
void destroy_blacklists(void)
{
rb_dlink_node *ptr, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
struct Blacklist *blptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, blacklist_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, blacklist_list.head)
{
blptr = ptr->data;
blptr->hits = 0; /* keep it simple and consistent */
@ -218,7 +218,7 @@ void destroy_blacklists(void)
blptr->status |= CONF_ILLEGAL;
else
{
MyFree(ptr->data);
rb_free(ptr->data);
rb_dlinkDestroy(ptr, &blacklist_list);
}
}

View file

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

View file

@ -96,7 +96,7 @@ allocate_channel(const char *chname)
void
free_channel(struct Channel *chptr)
{
MyFree(chptr->chname);
rb_free(chptr->chname);
BlockHeapFree(channel_heap, chptr);
}
@ -114,8 +114,8 @@ allocate_ban(const char *banstr, const char *who)
void
free_ban(struct Ban *bptr)
{
MyFree(bptr->banstr);
MyFree(bptr->who);
rb_free(bptr->banstr);
rb_free(bptr->who);
BlockHeapFree(ban_heap, bptr);
}
@ -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 *rb_free(;
rb_dlink_node *next_ptr;
if(client_p == NULL)
return;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, client_p->user->channel.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
struct Ban *actualBan;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, list->head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, chptr->invites.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->invites.head)
{
del_invite(chptr, ptr->data);
}

View file

@ -66,8 +66,8 @@ free_class(struct Class *tmp)
if(tmp->ip_limits)
rb_destroy_patricia(tmp->ip_limits, NULL);
MyFree(tmp->class_name);
MyFree(tmp);
rb_free(tmp->class_name);
rb_free(tmp);
}
@ -246,9 +246,9 @@ check_class()
{
struct Class *cltmp;
rb_dlink_node *ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, class_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, class_list.head)
{
cltmp = ptr->data;

View file

@ -223,13 +223,13 @@ free_local_client(struct Client *client_p)
{
memset(client_p->localClient->passwd, 0,
strlen(client_p->localClient->passwd));
MyFree(client_p->localClient->passwd);
rb_free(client_p->localClient->passwd);
}
MyFree(client_p->localClient->challenge);
MyFree(client_p->localClient->fullcaps);
MyFree(client_p->localClient->opername);
MyFree(client_p->localClient->mangledhost);
rb_free(client_p->localClient->challenge);
rb_free(client_p->localClient->fullcaps);
rb_free(client_p->localClient->opername);
rb_free(client_p->localClient->mangledhost);
BlockHeapFree(lclient_heap, client_p->localClient);
client_p->localClient = NULL;
@ -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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, list->head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
struct Client *client_p;
int timeout;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, list->head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, rb_free(, unknown_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, rb_free(, unknown_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
{
client_p = ptr->data;
@ -791,8 +791,8 @@ release_client_state(struct Client *client_p)
if(client_p->serv->user != NULL)
free_user(client_p->serv->user, client_p);
if(client_p->serv->fullcaps)
MyFree(client_p->serv->fullcaps);
MyFree(client_p->serv);
rb_free(client_p->serv->fullcaps);
rb_free(client_p->serv);
}
}
@ -1283,7 +1283,7 @@ exit_aborted_clients(void *unused)
*/
abt->client->flags &= ~FLAGS_CLOSING;
exit_client(abt->client, abt->client, &me, abt->notice);
MyFree(abt);
rb_free(abt);
}
}
@ -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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
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, rb_free(, source_p->user->invited.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, client_p->localClient->allow_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, rb_free(, client_p->on_allow_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->on_allow_list.head)
{
target_p = ptr->data;
rb_dlinkFindDestroy(client_p, &target_p->localClient->allow_list);
@ -1909,7 +1909,7 @@ free_user(struct User *user, struct Client *client_p)
if(--user->refcnt <= 0)
{
if(user->away)
MyFree((char *) user->away);
rb_free((char *) user->away);
/*
* sanity check
*/

View file

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

View file

@ -97,7 +97,7 @@ grow_hooktable(void)
newhooks = MyMalloc(sizeof(hook) * (max_hooks + HOOK_INCREMENT));
memcpy(newhooks, hooks, sizeof(hook) * num_hooks);
MyFree(hooks);
rb_free(hooks);
hooks = newhooks;
max_hooks += HOOK_INCREMENT;
}

View file

@ -578,7 +578,7 @@ delete_one_address_conf(const char *address, struct ConfItem *aconf)
aconf->status |= CONF_ILLEGAL;
if(!aconf->clients)
free_conf(aconf);
MyFree(arec);
rb_free(arec);
return;
}
arecl = arec;
@ -618,7 +618,7 @@ clear_out_address_conf(void)
arec->aconf->status |= CONF_ILLEGAL;
if(!arec->aconf->clients)
free_conf(arec->aconf);
MyFree(arec);
rb_free(arec);
}
}
*store_next = NULL;
@ -651,7 +651,7 @@ clear_out_address_conf_bans(void)
arec->aconf->status |= CONF_ILLEGAL;
if(!arec->aconf->clients)
free_conf(arec->aconf);
MyFree(arec);
rb_free(arec);
}
}
*store_next = NULL;

View file

@ -476,7 +476,7 @@ void irc_dictionary_destroy(struct Dictionary *dtree,
BlockHeapFree(elem_heap, n);
}
MyFree(dtree);
rb_free(dtree);
}
/*

View file

@ -105,7 +105,7 @@ static void free_cur_list(conf_parm_t* list)
{
case CF_STRING:
case CF_QSTRING:
MyFree(list->v.string);
rb_free(list->v.string);
break;
case CF_LIST:
free_cur_list(list->v.list);

View file

@ -93,7 +93,7 @@ free_listener(listener_t *listener)
}
/* free */
MyFree(listener);
rb_free(listener);
}
#define PORTNAMELEN 6 /* ":31337" */

View file

@ -179,11 +179,11 @@ mod_add_path(const char *path)
void
mod_clear_paths(void)
{
rb_dlink_node *ptr, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, mod_paths.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, mod_paths.head)
{
MyFree(ptr->data);
rb_free(ptr->data);
free_rb_dlink_node(ptr);
}
@ -364,13 +364,13 @@ mo_modload(struct Client *client_p, struct Client *source_p, int parc, const cha
if(findmodule_byname(m_bn) != -1)
{
sendto_one_notice(source_p, ":Module %s is already loaded", m_bn);
MyFree(m_bn);
rb_free(m_bn);
return 0;
}
load_one_module(parv[1], 0);
MyFree(m_bn);
rb_free(m_bn);
return 0;
}
@ -395,14 +395,14 @@ mo_modunload(struct Client *client_p, struct Client *source_p, int parc, const c
if((modindex = findmodule_byname(m_bn)) == -1)
{
sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
MyFree(m_bn);
rb_free(m_bn);
return 0;
}
if(modlist[modindex]->core == 1)
{
sendto_one_notice(source_p, ":Module %s is a core module and may not be unloaded", m_bn);
MyFree(m_bn);
rb_free(m_bn);
return 0;
}
@ -411,7 +411,7 @@ mo_modunload(struct Client *client_p, struct Client *source_p, int parc, const c
sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
}
MyFree(m_bn);
rb_free(m_bn);
return 0;
}
@ -435,7 +435,7 @@ mo_modreload(struct Client *client_p, struct Client *source_p, int parc, const c
if((modindex = findmodule_byname(m_bn)) == -1)
{
sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
MyFree(m_bn);
rb_free(m_bn);
return 0;
}
@ -444,7 +444,7 @@ mo_modreload(struct Client *client_p, struct Client *source_p, int parc, const c
if(unload_one_module(m_bn, 1) == -1)
{
sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
MyFree(m_bn);
rb_free(m_bn);
return 0;
}
@ -456,7 +456,7 @@ mo_modreload(struct Client *client_p, struct Client *source_p, int parc, const c
exit(0);
}
MyFree(m_bn);
rb_free(m_bn);
return 0;
}
@ -757,7 +757,7 @@ unload_one_module(const char *name, int warn)
dlclose(modlist[modindex]->address);
MyFree(modlist[modindex]->name);
rb_free(modlist[modindex]->name);
memcpy(&modlist[modindex], &modlist[modindex + 1],
sizeof(struct module) * ((num_mods - 1) - modindex));
@ -806,7 +806,7 @@ load_a_module(const char *path, int warn, int core)
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Error loading module %s: %s", mod_basename, err);
ilog(L_MAIN, "Error loading module %s: %s", mod_basename, err);
MyFree(mod_basename);
rb_free(mod_basename);
return -1;
}
@ -827,7 +827,7 @@ load_a_module(const char *path, int warn, int core)
mod_basename);
ilog(L_MAIN, "Data format error: module %s has no MAPI header.", mod_basename);
(void) dlclose(tmpptr);
MyFree(mod_basename);
rb_free(mod_basename);
return -1;
}
@ -844,7 +844,7 @@ load_a_module(const char *path, int warn, int core)
"Module %s indicated failure during load.",
mod_basename);
dlclose(tmpptr);
MyFree(mod_basename);
rb_free(mod_basename);
return -1;
}
if(mheader->mapi_command_list)
@ -879,7 +879,7 @@ load_a_module(const char *path, int warn, int core)
"Module %s has unknown/unsupported MAPI version %d.",
mod_basename, *mapi_version);
dlclose(tmpptr);
MyFree(mod_basename);
rb_free(mod_basename);
return -1;
}
@ -906,7 +906,7 @@ load_a_module(const char *path, int warn, int core)
ilog(L_MAIN, "Module %s [version: %s; MAPI version: %d] loaded at 0x%lx",
mod_basename, ver, MAPI_VERSION(*mapi_version), (unsigned long) tmpptr);
}
MyFree(mod_basename);
rb_free(mod_basename);
return 0;
}
@ -929,7 +929,7 @@ increase_modlist(void)
(max_mods + MODS_INCREMENT));
memcpy((void *) new_modlist, (void *) modlist, sizeof(struct module) * num_mods);
MyFree(modlist);
rb_free(modlist);
modlist = new_modlist;
max_mods += MODS_INCREMENT;
}

View file

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

View file

@ -150,7 +150,7 @@ remove_top_conf(char *name)
return -1;
rb_dlinkDestroy(ptr, &conf_items);
MyFree(tc);
rb_free(tc);
return 0;
}
@ -222,7 +222,7 @@ conf_set_serverinfo_network_name(void *data)
if((p = strchr((char *) data, ' ')))
*p = '\0';
MyFree(ServerInfo.network_name);
rb_free(ServerInfo.network_name);
DupString(ServerInfo.network_name, (char *) data);
}
@ -268,7 +268,7 @@ conf_set_modules_module(void *data)
load_one_module((char *) data, 0);
MyFree(m_bn);
rb_free(m_bn);
#else
conf_report_error("Ignoring modules::module -- loadable module support not present.");
#endif
@ -449,7 +449,7 @@ static int
conf_begin_oper(struct TopConf *tc)
{
rb_dlink_node *ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *next_ptr;
if(yy_oper != NULL)
{
@ -457,7 +457,7 @@ conf_begin_oper(struct TopConf *tc)
yy_oper = NULL;
}
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, yy_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_oper_list.head)
{
yy_tmpoper = ptr->data;
@ -605,7 +605,7 @@ conf_set_oper_password(void *data)
if(yy_oper->passwd)
{
memset(yy_oper->passwd, 0, strlen(yy_oper->passwd));
MyFree(yy_oper->passwd);
rb_free(yy_oper->passwd);
}
DupString(yy_oper->passwd, (char *) data);
@ -615,7 +615,7 @@ static void
conf_set_oper_rsa_public_key_file(void *data)
{
#ifdef HAVE_LIBCRYPTO
MyFree(yy_oper->rsa_pubkey_file);
rb_free(yy_oper->rsa_pubkey_file);
DupString(yy_oper->rsa_pubkey_file, (char *) data);
#else
conf_report_error("Warning -- ignoring rsa_public_key_file (OpenSSL support not available");
@ -731,7 +731,7 @@ static char *listener_address;
static int
conf_begin_listen(struct TopConf *tc)
{
MyFree(listener_address);
rb_free(listener_address);
listener_address = NULL;
return 0;
}
@ -739,7 +739,7 @@ conf_begin_listen(struct TopConf *tc)
static int
conf_end_listen(struct TopConf *tc)
{
MyFree(listener_address);
rb_free(listener_address);
listener_address = NULL;
return 0;
}
@ -783,7 +783,7 @@ conf_set_listen_port(void *data)
static void
conf_set_listen_address(void *data)
{
MyFree(listener_address);
rb_free(listener_address);
DupString(listener_address, data);
}
@ -791,12 +791,12 @@ static int
conf_begin_auth(struct TopConf *tc)
{
rb_dlink_node *ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *next_ptr;
if(yy_aconf)
free_conf(yy_aconf);
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_aconf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, yy_aconf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_aconf_list.head)
{
yy_tmp = ptr->data;
@ -897,7 +897,7 @@ conf_set_auth_passwd(void *data)
{
if(yy_aconf->passwd)
memset(yy_aconf->passwd, 0, strlen(yy_aconf->passwd));
MyFree(yy_aconf->passwd);
rb_free(yy_aconf->passwd);
DupString(yy_aconf->passwd, data);
}
@ -957,7 +957,7 @@ conf_set_auth_spoof(void *data)
return;
}
MyFree(yy_aconf->name);
rb_free(yy_aconf->name);
DupString(yy_aconf->name, data);
yy_aconf->flags |= CONF_FLAGS_SPOOF_IP;
}
@ -974,7 +974,7 @@ static void
conf_set_auth_redir_serv(void *data)
{
yy_aconf->flags |= CONF_FLAGS_REDIR;
MyFree(yy_aconf->name);
rb_free(yy_aconf->name);
DupString(yy_aconf->name, data);
}
@ -990,7 +990,7 @@ conf_set_auth_redir_port(void *data)
static void
conf_set_auth_class(void *data)
{
MyFree(yy_aconf->className);
rb_free(yy_aconf->className);
DupString(yy_aconf->className, data);
}
@ -1001,9 +1001,9 @@ conf_set_auth_class(void *data)
static int
conf_cleanup_shared(struct TopConf *tc)
{
rb_dlink_node *ptr, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_shared_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
if(yy_shared != NULL)
free_remote_conf(yy_shared);
set_modes_from_table(&flags, "flag", shared_table, args);
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_shared_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_shared_list.head)
{
yy_shared = ptr->data;
@ -1161,7 +1161,7 @@ conf_end_connect(struct TopConf *tc)
static void
conf_set_connect_host(void *data)
{
MyFree(yy_server->host);
rb_free(yy_server->host);
DupString(yy_server->host, data);
if (strchr(yy_server->host, ':'))
yy_server->aftype = AF_INET6;
@ -1186,7 +1186,7 @@ conf_set_connect_send_password(void *data)
if(yy_server->spasswd)
{
memset(yy_server->spasswd, 0, strlen(yy_server->spasswd));
MyFree(yy_server->spasswd);
rb_free(yy_server->spasswd);
}
DupString(yy_server->spasswd, data);
@ -1198,7 +1198,7 @@ conf_set_connect_accept_password(void *data)
if(yy_server->passwd)
{
memset(yy_server->passwd, 0, strlen(yy_server->passwd));
MyFree(yy_server->passwd);
rb_free(yy_server->passwd);
}
DupString(yy_server->passwd, data);
}
@ -1275,7 +1275,7 @@ conf_set_connect_leaf_mask(void *data)
static void
conf_set_connect_class(void *data)
{
MyFree(yy_server->class_name);
rb_free(yy_server->class_name);
DupString(yy_server->class_name, data);
}
@ -1300,9 +1300,9 @@ conf_set_exempt_ip(void *data)
static int
conf_cleanup_cluster(struct TopConf *tc)
{
rb_dlink_node *ptr, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_cluster_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
if(yy_shared != NULL)
free_remote_conf(yy_shared);
set_modes_from_table(&flags, "flag", cluster_table, args);
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, yy_cluster_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, yy_cluster_list.head)
{
yy_shared = ptr->data;
yy_shared->flags = flags;
@ -1603,7 +1603,7 @@ conf_end_alias(struct TopConf *tc)
{
conf_report_error("Ignoring alias -- must have a name.");
MyFree(yy_alias);
rb_free(yy_alias);
return -1;
}
@ -1612,7 +1612,7 @@ conf_end_alias(struct TopConf *tc)
{
conf_report_error("Ignoring alias -- must have a target.");
MyFree(yy_alias);
rb_free(yy_alias);
return -1;
}
@ -1657,8 +1657,8 @@ conf_set_blacklist_reason(void *data)
if (yy_blacklist_host && yy_blacklist_reason)
{
new_blacklist(yy_blacklist_host, yy_blacklist_reason);
MyFree(yy_blacklist_host);
MyFree(yy_blacklist_reason);
rb_free(yy_blacklist_host);
rb_free(yy_blacklist_reason);
yy_blacklist_host = NULL;
yy_blacklist_reason = NULL;
}
@ -1714,7 +1714,7 @@ conf_end_block(struct TopConf *tc)
if(tc->tc_efunc)
return tc->tc_efunc(tc);
MyFree(conf_cur_block_name);
rb_free(conf_cur_block_name);
return 0;
}
@ -1733,7 +1733,7 @@ conf_set_generic_string(void *data, int len, void *location)
if(len && strlen(input) > len)
input[len] = '\0';
MyFree(*loc);
rb_free(*loc);
DupString(*loc, input);
}
@ -1875,7 +1875,7 @@ remove_conf_item(const char *topconf, const char *name)
return -1;
rb_dlinkDestroy(ptr, &tc->tc_items);
MyFree(cf);
rb_free(cf);
return 0;
}

View file

@ -319,7 +319,7 @@ read_ctrl_packet(int fd, void *data)
/* reset SlinkRpl */
if(reply->datalen > 0)
MyFree(reply->data);
rb_free(reply->data);
reply->command = 0;
if(IsAnyDead(server))

View file

@ -102,7 +102,7 @@ reject_expires(void *unused)
continue;
rb_dlinkDelete(ptr, &reject_list);
MyFree(rdata);
rb_free(rdata);
patricia_remove(reject_tree, pnode);
}
}
@ -199,7 +199,7 @@ flush_reject(void)
pnode = ptr->data;
rdata = pnode->data;
rb_dlinkDelete(ptr, &reject_list);
MyFree(rdata);
rb_free(rdata);
patricia_remove(reject_tree, pnode);
}
}
@ -218,7 +218,7 @@ remove_reject_ip(const char *ip)
{
struct reject_data *rdata = pnode->data;
rb_dlinkDelete(&rdata->rnode, &reject_list);
MyFree(rdata);
rb_free(rdata);
patricia_remove(reject_tree, pnode);
return 1;
}
@ -246,7 +246,7 @@ remove_reject_mask(const char *mask1, const char *mask2)
if (rdata->mask_hashv == hashv)
{
rb_dlinkDelete(ptr, &reject_list);
MyFree(rdata);
rb_free(rdata);
patricia_remove(reject_tree, pnode);
n++;
}

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 *rb_free(;
rb_dlink_node *next_ptr;
struct reslist *request;
time_t next_time = 0;
time_t timeout = 0;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, request_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, request_list.head)
{
request = ptr->data;
timeout = request->sentat + request->timeout;
@ -287,8 +287,8 @@ void add_local_domain(char *hname, size_t size)
static void rem_request(struct reslist *request)
{
rb_dlinkDelete(&request->node, &request_list);
MyFree(request->name);
MyFree(request);
rb_free(request->name);
rb_free(request);
}
/*
@ -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 *rb_free(;
rb_dlink_node *next_ptr;
struct reslist *request;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, request_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, request_list.head)
{
if ((request = ptr->data) != NULL)
{
@ -831,7 +831,7 @@ static void res_readreply(int fd, void *data)
*/
reply = make_dnsreply(request);
(*request->query->callback) (request->query->ptr, reply);
MyFree(reply);
rb_free(reply);
rem_request(request);
}
}

View file

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

View file

@ -139,12 +139,12 @@ free_conf(struct ConfItem *aconf)
if(aconf->spasswd)
memset(aconf->spasswd, 0, strlen(aconf->spasswd));
MyFree(aconf->passwd);
MyFree(aconf->spasswd);
MyFree(aconf->name);
MyFree(aconf->className);
MyFree(aconf->user);
MyFree(aconf->host);
rb_free(aconf->passwd);
rb_free(aconf->spasswd);
rb_free(aconf->name);
rb_free(aconf->className);
rb_free(aconf->user);
rb_free(aconf->host);
BlockHeapFree(confitem_heap, aconf);
}
@ -1005,10 +1005,10 @@ static void
expire_temp_kd(void *list)
{
rb_dlink_node *ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *next_ptr;
struct ConfItem *aconf;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, ((rb_dlink_list *) list)->head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, ((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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, ((rb_dlink_list *) list)->head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, ((rb_dlink_list *) list)->head)
{
aconf = ptr->data;
@ -1193,9 +1193,9 @@ free_alias_cb(struct DictionaryElement *ptr, void *unused)
{
struct alias_entry *aptr = ptr->data;
MyFree(aptr->name);
MyFree(aptr->target);
MyFree(aptr);
rb_free(aptr->name);
rb_free(aptr->target);
rb_free(aptr);
}
/*
@ -1210,7 +1210,7 @@ clear_out_old_conf(void)
{
struct Class *cltmp;
rb_dlink_node *ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *next_ptr;
/*
* don't delete the class table, rather mark all entries
@ -1233,19 +1233,19 @@ clear_out_old_conf(void)
#endif
/* clean out ServerInfo */
MyFree(ServerInfo.description);
rb_free(ServerInfo.description);
ServerInfo.description = NULL;
MyFree(ServerInfo.network_name);
rb_free(ServerInfo.network_name);
ServerInfo.network_name = NULL;
MyFree(ServerInfo.network_desc);
rb_free(ServerInfo.network_desc);
ServerInfo.network_desc = NULL;
/* clean out AdminInfo */
MyFree(AdminInfo.name);
rb_free(AdminInfo.name);
AdminInfo.name = NULL;
MyFree(AdminInfo.email);
rb_free(AdminInfo.email);
AdminInfo.email = NULL;
MyFree(AdminInfo.description);
rb_free(AdminInfo.description);
AdminInfo.description = NULL;
/* operator{} and class{} blocks are freed above */
@ -1257,12 +1257,12 @@ clear_out_old_conf(void)
*/
/* clean out general */
MyFree(ConfigFileEntry.servlink_path);
rb_free(ConfigFileEntry.servlink_path);
ConfigFileEntry.servlink_path = NULL;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, service_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, service_list.head)
{
MyFree(ptr->data);
rb_free(ptr->data);
rb_dlinkDestroy(ptr, &service_list);
}
@ -1460,7 +1460,7 @@ conf_add_class_to_conf(struct ConfItem *aconf)
aconf->className, aconf->user, aconf->host);
}
MyFree(aconf->className);
rb_free(aconf->className);
DupString(aconf->className, "default");
return;
}
@ -1468,7 +1468,7 @@ conf_add_class_to_conf(struct ConfItem *aconf)
if(ConfMaxUsers(aconf) < 0)
{
ClassPtr(aconf) = default_class;
MyFree(aconf->className);
rb_free(aconf->className);
DupString(aconf->className, "default");
return;
}

View file

@ -154,9 +154,9 @@ expire_pending_glines()
CurrentTime) || find_is_glined(glp_ptr->host, glp_ptr->user))
{
MyFree(glp_ptr->reason1);
MyFree(glp_ptr->reason2);
MyFree(glp_ptr);
rb_free(glp_ptr->reason1);
rb_free(glp_ptr->reason2);
rb_free(glp_ptr);
rb_dlinkDestroy(pending_node, &pending_glines);
}
}

View file

@ -77,34 +77,34 @@ clear_s_newconf(void)
{
struct server_conf *server_p;
rb_dlink_node *ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, shared_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, rb_free(, cluster_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, cluster_conf_list.head)
{
rb_dlinkDelete(ptr, &cluster_conf_list);
free_remote_conf(ptr->data);
}
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, hubleaf_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, hubleaf_conf_list.head)
{
rb_dlinkDelete(ptr, &hubleaf_conf_list);
free_remote_conf(ptr->data);
}
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, oper_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, oper_conf_list.head)
{
free_oper_conf(ptr->data);
rb_dlinkDestroy(ptr, &oper_conf_list);
}
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, server_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, xline_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, rb_free(, resv_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head)
{
aconf = ptr->data;
@ -164,10 +164,10 @@ free_remote_conf(struct remote_conf *remote_p)
if(remote_p == NULL)
return;
MyFree(remote_p->username);
MyFree(remote_p->host);
MyFree(remote_p->server);
MyFree(remote_p);
rb_free(remote_p->username);
rb_free(remote_p->host);
rb_free(remote_p->server);
rb_free(remote_p);
}
int
@ -257,24 +257,24 @@ free_oper_conf(struct oper_conf *oper_p)
if(oper_p == NULL)
return;
MyFree(oper_p->username);
MyFree(oper_p->host);
MyFree(oper_p->name);
rb_free(oper_p->username);
rb_free(oper_p->host);
rb_free(oper_p->name);
if(oper_p->passwd)
{
memset(oper_p->passwd, 0, strlen(oper_p->passwd));
MyFree(oper_p->passwd);
rb_free(oper_p->passwd);
}
#ifdef HAVE_LIBCRYPTO
MyFree(oper_p->rsa_pubkey_file);
rb_free(oper_p->rsa_pubkey_file);
if(oper_p->rsa_pubkey)
RSA_free(oper_p->rsa_pubkey);
#endif
MyFree(oper_p);
rb_free(oper_p);
}
struct oper_conf *
@ -384,19 +384,19 @@ free_server_conf(struct server_conf *server_p)
if(!EmptyString(server_p->passwd))
{
memset(server_p->passwd, 0, strlen(server_p->passwd));
MyFree(server_p->passwd);
rb_free(server_p->passwd);
}
if(!EmptyString(server_p->spasswd))
{
memset(server_p->spasswd, 0, strlen(server_p->spasswd));
MyFree(server_p->spasswd);
rb_free(server_p->spasswd);
}
MyFree(server_p->name);
MyFree(server_p->host);
MyFree(server_p->class_name);
MyFree(server_p);
rb_free(server_p->name);
rb_free(server_p->host);
rb_free(server_p->class_name);
rb_free(server_p);
}
void
@ -416,7 +416,7 @@ add_server_conf(struct server_conf *server_p)
conf_report_error("Warning connect::class invalid for %s",
server_p->name);
MyFree(server_p->class_name);
rb_free(server_p->class_name);
DupString(server_p->class_name, "default");
}
@ -686,10 +686,10 @@ expire_temp_rxlines(void *unused)
{
struct ConfItem *aconf;
rb_dlink_node *ptr;
rb_dlink_node *rb_free(;
rb_dlink_node *next_ptr;
int i;
HASH_WALK_SAFE(i, R_MAX, ptr, rb_free(, resvTable)
HASH_WALK_SAFE(i, R_MAX, ptr, next_ptr, resvTable)
{
aconf = ptr->data;
@ -706,7 +706,7 @@ expire_temp_rxlines(void *unused)
}
HASH_WALK_END
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, resv_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head)
{
aconf = ptr->data;
@ -721,7 +721,7 @@ expire_temp_rxlines(void *unused)
}
}
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, xline_conf_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, nd_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, nd_list.head)
{
nd = ptr->data;

View file

@ -1016,7 +1016,7 @@ server_estab(struct Client *client_p)
if(client_p->localClient->passwd)
{
memset(client_p->localClient->passwd, 0, strlen(client_p->localClient->passwd));
MyFree(client_p->localClient->passwd);
rb_free(client_p->localClient->passwd);
client_p->localClient->passwd = NULL;
}
@ -1108,7 +1108,7 @@ server_estab(struct Client *client_p)
if(client_p->localClient->fullcaps)
{
DupString(client_p->serv->fullcaps, client_p->localClient->fullcaps);
MyFree(client_p->localClient->fullcaps);
rb_free(client_p->localClient->fullcaps);
client_p->localClient->fullcaps = NULL;
}

View file

@ -377,7 +377,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
if(source_p->localClient->passwd)
{
memset(source_p->localClient->passwd, 0, strlen(source_p->localClient->passwd));
MyFree(source_p->localClient->passwd);
rb_free(source_p->localClient->passwd);
source_p->localClient->passwd = NULL;
}
}
@ -673,7 +673,7 @@ introduce_client(struct Client *client_p, struct Client *source_p, struct User *
source_p->localClient->passwd);
}
memset(source_p->localClient->passwd, 0, strlen(source_p->localClient->passwd));
MyFree(source_p->localClient->passwd);
rb_free(source_p->localClient->passwd);
source_p->localClient->passwd = NULL;
}
@ -987,7 +987,7 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char
}
source_p->flags2 &= ~OPER_FLAGS;
MyFree(source_p->localClient->opername);
rb_free(source_p->localClient->opername);
source_p->localClient->opername = NULL;
rb_dlinkFindDestroy(source_p, &local_oper_list);

View file

@ -263,7 +263,7 @@ send_queued_slink_write(int fd, void *data)
else
{
to->localClient->slinkq_ofs = 0;
MyFree(to->localClient->slinkq);
rb_free(to->localClient->slinkq);
to->localClient->slinkq = NULL;
}
}
@ -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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, serv_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, chptr->members.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, chptr->locmembers.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, chptr->locmembers.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, user->user->channel.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, user->user->channel.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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, rb_free(, lclient_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, monptr->users.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, local_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, local_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, local_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, IsPerson(source_p) && flags == UMODE_WALLOP ? lclient_list.head : local_oper_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, 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 *rb_free(;
rb_dlink_node *next_ptr;
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, rb_free(, serv_list.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, serv_list.head)
{
client_p = ptr->data;

View file

@ -81,9 +81,9 @@ void substitution_free(rb_dlink_list *varlist)
struct substitution_variable *tmp = (struct substitution_variable *) nptr->data;
rb_dlinkDelete(nptr, varlist);
MyFree(tmp->name);
MyFree(tmp->value);
MyFree(tmp);
rb_free(tmp->name);
rb_free(tmp->value);
rb_free(tmp);
}
}

View file

@ -113,17 +113,17 @@ add_isupport(const char *name, const char *(*func)(const void *), const void *pa
void
delete_isupport(const char *name)
{
rb_dlink_node *ptr, *rb_free(;
rb_dlink_node *ptr, *next_ptr;
struct isupportitem *item;
RB_DLINK_FOREACH_SAFE(ptr, rb_free(, isupportlist.head)
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, isupportlist.head)
{
item = ptr->data;
if (!strcmp(item->name, name))
{
rb_dlinkDelete(ptr, &isupportlist);
MyFree(item);
rb_free(item);
}
}
}