ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_stats.c
(Generate patch)

Comparing ircd-hybrid/trunk/modules/m_stats.c (file contents):
Revision 9070 by michael, Sat Oct 5 17:25:40 2019 UTC vs.
Revision 9071 by michael, Sat Oct 5 17:45:20 2019 UTC

# Line 502 | Line 502 | stats_memory(struct Client *source_p, in
502   static void
503   stats_dns_servers(struct Client *source_p, int parc, char *parv[])
504   {
505 <  char ipaddr[HOSTIPLEN + 1] = "";
505 >  char ipaddr[HOSTIPLEN + 1];
506  
507    for (unsigned int i = 0; i < irc_nscount; ++i)
508    {
# Line 740 | Line 740 | stats_auth(struct Client *source_p, int
740    /* If unopered, only return matching auth blocks */
741    else if (ConfigGeneral.stats_i_oper_only == 1 && !HasUMode(source_p, UMODE_OPER))
742    {
743 <    const struct MaskItem *conf = NULL;
743 >    const struct MaskItem *conf;
744  
745      if (MyConnect(source_p))
746        conf = find_conf_by_address(source_p->host,
# Line 774 | Line 774 | static void
774   report_Klines(struct Client *source_p, int tkline)
775   {
776    dlink_node *node;
777 <  char c = '\0';
777 >  char c;
778  
779    if (tkline)
780      c = 'k';
# Line 811 | Line 811 | stats_tklines(struct Client *source_p, i
811    /* If unopered, only return matching klines */
812    else if (ConfigGeneral.stats_k_oper_only == 1 && !HasUMode(source_p, UMODE_OPER))
813    {
814 <    const struct MaskItem *conf = NULL;
814 >    const struct MaskItem *conf;
815  
816      if (MyConnect(source_p))
817        conf = find_conf_by_address(source_p->host,
# Line 845 | Line 845 | stats_klines(struct Client *source_p, in
845    /* If unopered, only return matching klines */
846    else if (ConfigGeneral.stats_k_oper_only == 1 && !HasUMode(source_p, UMODE_OPER))
847    {
848 <    const struct MaskItem *conf = NULL;
848 >    const struct MaskItem *conf;
849  
850      /* Search for a kline */
851      if (MyConnect(source_p))
# Line 904 | Line 904 | stats_operedup(struct Client *source_p,
904   {
905    dlink_node *node;
906    unsigned int opercount = 0;
907 <  char buf[IRCD_BUFSIZE] = "";
907 >  char buf[IRCD_BUFSIZE];
908  
909    DLINK_FOREACH(node, oper_list.head)
910    {
# Line 1122 | Line 1122 | stats_servlinks(struct Client *source_p,
1122   {
1123    dlink_node *node;
1124    uintmax_t sendB = 0, recvB = 0;
1125  uintmax_t uptime = 0;
1125  
1126    if (ConfigServerHide.flatten_links && !HasUMode(source_p, UMODE_OPER))
1127    {
# Line 1164 | Line 1163 | stats_servlinks(struct Client *source_p,
1163    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT, "? :Recv total: %7.2f %s",
1164                       _GMKv(recvB), _GMKs(recvB));
1165  
1166 <  uptime = (event_base->time.sec_monotonic - me.connection->created_monotonic);
1168 <
1166 >  uintmax_t uptime = (event_base->time.sec_monotonic - me.connection->created_monotonic);
1167    sendto_one_numeric(source_p, &me, RPL_STATSDEBUG | SND_EXPLICIT,
1168                       "? :Server send: %7.2f %s (%4.1f KiB/s)",
1169                       _GMKv((me.connection->send.bytes >> 10)),
# Line 1224 | Line 1222 | stats_L_list(struct Client *source_p, co
1222    DLINK_FOREACH(node, list->head)
1223    {
1224      const struct Client *target_p = node->data;
1225 <    enum addr_mask_type type = 0;
1225 >    enum addr_mask_type type;
1226  
1227      if (!doall && wilds && match(name, target_p->name))
1228        continue;
# Line 1277 | Line 1275 | stats_ltrace(struct Client *source_p, in
1275   {
1276    bool doall = false;
1277    bool wilds = false;
1278 <  const char *name = NULL;
1278 >  const char *name;
1279  
1280    if ((name = parse_stats_args(source_p, parc, parv, &doall, &wilds)))
1281    {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines