diff --git a/ircd/cache.c b/ircd/cache.c index 58a9044c..3b267170 100644 --- a/ircd/cache.c +++ b/ircd/cache.c @@ -243,12 +243,12 @@ load_help(void) struct stat sb; #endif - DICTIONARY_FOREACH(cacheptr, &iter, help_dict_oper) + RB_DICTIONARY_FOREACH(cacheptr, &iter, help_dict_oper) { rb_dictionary_delete(help_dict_oper, cacheptr->name); free_cachefile(cacheptr); } - DICTIONARY_FOREACH(cacheptr, &iter, help_dict_user) + RB_DICTIONARY_FOREACH(cacheptr, &iter, help_dict_user) { rb_dictionary_delete(help_dict_user, cacheptr->name); free_cachefile(cacheptr); diff --git a/ircd/capability.c b/ircd/capability.c index 38a6c5a5..e818d919 100644 --- a/ircd/capability.c +++ b/ircd/capability.c @@ -175,7 +175,7 @@ capability_index_list(struct CapabilityIndex *idx, unsigned int cap_mask) *t = '\0'; - DICTIONARY_FOREACH(entry, &iter, idx->cap_dict) + RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict) { if ((1 << entry->value) & cap_mask) { @@ -199,7 +199,7 @@ capability_index_mask(struct CapabilityIndex *idx) s_assert(idx != NULL); - DICTIONARY_FOREACH(entry, &iter, idx->cap_dict) + RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict) { if (!(entry->flags & CAP_ORPHANED)) mask |= (1 << entry->value); @@ -217,7 +217,7 @@ capability_index_get_required(struct CapabilityIndex *idx) s_assert(idx != NULL); - DICTIONARY_FOREACH(entry, &iter, idx->cap_dict) + RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict) { if (!(entry->flags & CAP_ORPHANED) && (entry->flags & CAP_REQUIRED)) mask |= (1 << entry->value); @@ -241,7 +241,7 @@ capability_index_stats(void (*cb)(const char *line, void *privdata), void *privd snprintf(buf, sizeof buf, "'%s': allocated bits - %d", idx->name, (idx->highest_bit - 1)); cb(buf, privdata); - DICTIONARY_FOREACH(entry, &iter, idx->cap_dict) + RB_DICTIONARY_FOREACH(entry, &iter, idx->cap_dict) { snprintf(buf, sizeof buf, "bit %d: '%s'", entry->value, entry->cap); cb(buf, privdata); diff --git a/librb/include/rb_dictionary.h b/librb/include/rb_dictionary.h index 3f8a7c22..d27db305 100644 --- a/librb/include/rb_dictionary.h +++ b/librb/include/rb_dictionary.h @@ -47,7 +47,7 @@ struct DictionaryIter /* * this is a convenience macro for inlining iteration of dictionaries. */ -#define DICTIONARY_FOREACH(element, state, dict) for (rb_dictionary_foreach_start((dict), (state)); (element = rb_dictionary_foreach_cur((dict), (state))); rb_dictionary_foreach_next((dict), (state))) +#define RB_DICTIONARY_FOREACH(element, state, dict) for (rb_dictionary_foreach_start((dict), (state)); (element = rb_dictionary_foreach_cur((dict), (state))); rb_dictionary_foreach_next((dict), (state))) /* * rb_dictionary_create_named() creates a new dictionary tree which has a name. diff --git a/modules/m_cap.c b/modules/m_cap.c index c054aeea..0ce25ac6 100644 --- a/modules/m_cap.c +++ b/modules/m_cap.c @@ -171,7 +171,7 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags) return; } - DICTIONARY_FOREACH(entry, &iter, cli_capindex->cap_dict) + RB_DICTIONARY_FOREACH(entry, &iter, cli_capindex->cap_dict) { size_t caplen = 0; struct ClientCapability *clicap = entry->ownerdata; diff --git a/modules/m_stats.c b/modules/m_stats.c index b963d2ba..2602042b 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -287,7 +287,7 @@ stats_delay(struct Client *source_p) struct nd_entry *nd; struct DictionaryIter iter; - DICTIONARY_FOREACH(nd, &iter, nd_dict) + RB_DICTIONARY_FOREACH(nd, &iter, nd_dict) { sendto_one_notice(source_p, ":Delaying: %s for %ld", nd->name, (long) nd->expire); @@ -738,7 +738,7 @@ stats_messages(struct Client *source_p) struct Message *msg; struct alias_entry *amsg; - DICTIONARY_FOREACH(msg, &iter, cmd_dict) + RB_DICTIONARY_FOREACH(msg, &iter, cmd_dict) { s_assert(msg->cmd != NULL); sendto_one_numeric(source_p, RPL_STATSCOMMANDS, @@ -747,7 +747,7 @@ stats_messages(struct Client *source_p) msg->bytes, msg->rcount); } - DICTIONARY_FOREACH(amsg, &iter, alias_dict) + RB_DICTIONARY_FOREACH(amsg, &iter, alias_dict) { s_assert(amsg->name != NULL); sendto_one_numeric(source_p, RPL_STATSCOMMANDS,