diff --git a/include/ircd.h b/include/ircd.h index f01510c7c..dbd13434b 100644 --- a/include/ircd.h +++ b/include/ircd.h @@ -28,7 +28,6 @@ #include "defaults.h" struct Client; -struct rb_dlink_list; struct SetOptions { diff --git a/include/s_newconf.h b/include/s_newconf.h index 4218a8282..3866eae50 100644 --- a/include/s_newconf.h +++ b/include/s_newconf.h @@ -203,7 +203,7 @@ struct server_conf #endif char *class_name; - struct Class *class; + struct Class *_class; rb_dlink_node node; }; diff --git a/ircd/class.c b/ircd/class.c index 71a221d15..0381f2cf6 100644 --- a/ircd/class.c +++ b/ircd/class.c @@ -131,7 +131,7 @@ get_client_ping(struct Client *target_p) if(IsServer(target_p)) { struct server_conf *server_p = target_p->localClient->att_sconf; - ping = PingFreq(server_p->class); + ping = PingFreq(server_p->_class); } else { @@ -325,7 +325,7 @@ get_sendq(struct Client *client_p) { struct server_conf *server_p; server_p = client_p->localClient->att_sconf; - return MaxSendq(server_p->class); + return MaxSendq(server_p->_class); } else { diff --git a/ircd/client.c b/ircd/client.c index 9ec5c6cc7..9ec53b95c 100644 --- a/ircd/client.c +++ b/ircd/client.c @@ -2005,7 +2005,7 @@ close_connection(struct Client *client_p) server_p->hold = time(NULL); server_p->hold += (server_p->hold - client_p->localClient->lasttime > - HANGONGOODLINK) ? HANGONRETRYDELAY : ConFreq(server_p->class); + HANGONGOODLINK) ? HANGONRETRYDELAY : ConFreq(server_p->_class); } } diff --git a/ircd/s_newconf.c b/ircd/s_newconf.c index b4c3d419e..9ae02b571 100644 --- a/ircd/s_newconf.c +++ b/ircd/s_newconf.c @@ -442,13 +442,13 @@ add_server_conf(struct server_conf *server_p) if(EmptyString(server_p->class_name)) { server_p->class_name = rb_strdup("default"); - server_p->class = default_class; + server_p->_class = default_class; return; } - server_p->class = find_class(server_p->class_name); + server_p->_class = find_class(server_p->class_name); - if(server_p->class == default_class) + if(server_p->_class == default_class) { conf_report_error("Warning connect::class invalid for %s", server_p->name); @@ -511,7 +511,7 @@ attach_server_conf(struct Client *client_p, struct server_conf *server_p) detach_server_conf(client_p); } - CurrUsers(server_p->class)++; + CurrUsers(server_p->_class)++; client_p->localClient->att_sconf = server_p; server_p->servers++; @@ -527,13 +527,13 @@ detach_server_conf(struct Client *client_p) client_p->localClient->att_sconf = NULL; server_p->servers--; - CurrUsers(server_p->class)--; + CurrUsers(server_p->_class)--; if(ServerConfIllegal(server_p) && !server_p->servers) { /* the class this one is using may need destroying too */ - if(MaxUsers(server_p->class) < 0 && CurrUsers(server_p->class) <= 0) - free_class(server_p->class); + if(MaxUsers(server_p->_class) < 0 && CurrUsers(server_p->_class) <= 0) + free_class(server_p->_class); rb_dlinkDelete(&server_p->node, &server_conf_list); free_server_conf(server_p); diff --git a/ircd/s_serv.c b/ircd/s_serv.c index 5c3fa62a0..eba860ec2 100644 --- a/ircd/s_serv.c +++ b/ircd/s_serv.c @@ -272,7 +272,7 @@ try_connections(void *unused) if(ServerConfSSL(tmp_p) && (!ircd_ssl_ok || !get_ssld_count())) continue; - cltmp = tmp_p->class; + cltmp = tmp_p->_class; /* * Skip this entry if the use of it is still on hold until diff --git a/librb/include/rb_commio.h b/librb/include/rb_commio.h index f4dc687ba..58b08c3a5 100644 --- a/librb/include/rb_commio.h +++ b/librb/include/rb_commio.h @@ -191,6 +191,6 @@ rb_fde_t *rb_recv_fd(rb_fde_t *); const char *rb_ssl_get_cipher(rb_fde_t *F); -int rb_ipv4_from_ipv6(const struct sockaddr_in6 *restrict ip6, struct sockaddr_in *restrict ip4); +int rb_ipv4_from_ipv6(const struct sockaddr_in6 *__restrict__ ip6, struct sockaddr_in *__restrict__ ip4); #endif /* INCLUDED_commio_h */ diff --git a/librb/include/rb_dlink.h b/librb/include/rb_dlink.h index e793ae6d9..4a7359c3c 100644 --- a/librb/include/rb_dlink.h +++ b/librb/include/rb_dlink.h @@ -278,7 +278,7 @@ rb_dlinkFindDestroy(void *data, rb_dlink_list *list) if(ptr != NULL) { - rb_free_rb_dlink_node(ptr); + rb_free_rb_dlink_node((rb_dlink_node *)ptr); return 1; } return 0; diff --git a/librb/include/rb_memory.h b/librb/include/rb_memory.h index 7c0ac969a..0b61204ec 100644 --- a/librb/include/rb_memory.h +++ b/librb/include/rb_memory.h @@ -70,7 +70,7 @@ __attribute__((returns_nonnull)) static inline char * rb_strndup(const char *x, size_t y) { - char *ret = malloc(y); + char *ret = (char *)malloc(y); if(rb_unlikely(ret == NULL)) rb_outofmemory(); rb_strlcpy(ret, x, y); @@ -81,7 +81,7 @@ __attribute__((returns_nonnull)) static inline char * rb_strdup(const char *x) { - char *ret = malloc(strlen(x) + 1); + char *ret = (char *)malloc(strlen(x) + 1); if(rb_unlikely(ret == NULL)) rb_outofmemory(); strcpy(ret, x);