m_stats: z: remove unnecessary casting and fix format strings
This commit is contained in:
parent
7c5b4dbba7
commit
689afc7c51
1 changed files with 29 additions and 29 deletions
|
@ -1301,10 +1301,10 @@ stats_memory (struct Client *source_p)
|
||||||
(unsigned long) users_invited_count * sizeof(rb_dlink_node));
|
(unsigned long) users_invited_count * sizeof(rb_dlink_node));
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :User channels %u(%lu) Aways %u(%d)",
|
"z :User channels %u(%lu) Aways %u(%zu)",
|
||||||
user_channels,
|
user_channels,
|
||||||
(unsigned long) user_channels * sizeof(rb_dlink_node),
|
(unsigned long) user_channels * sizeof(rb_dlink_node),
|
||||||
aways_counted, (int) away_memory);
|
aways_counted, away_memory);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Attached confs %u(%lu)",
|
"z :Attached confs %u(%lu)",
|
||||||
|
@ -1312,7 +1312,7 @@ stats_memory (struct Client *source_p)
|
||||||
(unsigned long) local_client_conf_count * sizeof(rb_dlink_node));
|
(unsigned long) local_client_conf_count * sizeof(rb_dlink_node));
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Conflines %u(%d)", conf_count, (int) conf_memory);
|
"z :Conflines %u(%zu)", conf_count, conf_memory);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Classes %u(%lu)",
|
"z :Classes %u(%lu)",
|
||||||
|
@ -1320,15 +1320,15 @@ stats_memory (struct Client *source_p)
|
||||||
(unsigned long) class_count * sizeof(struct Class));
|
(unsigned long) class_count * sizeof(struct Class));
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Channels %u(%d)",
|
"z :Channels %u(%zu)",
|
||||||
channel_count, (int) channel_memory);
|
channel_count, channel_memory);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Bans %u(%d) Exceptions %u(%d) Invex %u(%d) Quiets %u(%d)",
|
"z :Bans %u(%zu) Exceptions %u(%zu) Invex %u(%zu) Quiets %u(%zu)",
|
||||||
channel_bans, (int) channel_ban_memory,
|
channel_bans, channel_ban_memory,
|
||||||
channel_except, (int) channel_except_memory,
|
channel_except, channel_except_memory,
|
||||||
channel_invex, (int) channel_invex_memory,
|
channel_invex, channel_invex_memory,
|
||||||
channel_quiets, (int) channel_quiet_memory);
|
channel_quiets, channel_quiet_memory);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Channel members %u(%lu) invite %u(%lu)",
|
"z :Channel members %u(%lu) invite %u(%lu)",
|
||||||
|
@ -1342,54 +1342,54 @@ stats_memory (struct Client *source_p)
|
||||||
channel_users * sizeof(rb_dlink_node) + channel_invites * sizeof(rb_dlink_node);
|
channel_users * sizeof(rb_dlink_node) + channel_invites * sizeof(rb_dlink_node);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Whowas array %ld(%ld)",
|
"z :Whowas array %zu(%zu)",
|
||||||
(long)ww, (long)wwm);
|
ww, wwm);
|
||||||
|
|
||||||
totww = wwm;
|
totww = wwm;
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Hash: client %u(%ld) chan %u(%ld)",
|
"z :Hash: client %u(%lu) chan %u(%lu)",
|
||||||
U_MAX, (long)(U_MAX * sizeof(rb_dlink_list)),
|
U_MAX, (unsigned long)(U_MAX * sizeof(rb_dlink_list)),
|
||||||
CH_MAX, (long)(CH_MAX * sizeof(rb_dlink_list)));
|
CH_MAX, (unsigned long)(CH_MAX * sizeof(rb_dlink_list)));
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :linebuf %ld(%ld)",
|
"z :linebuf %zu(%zu)",
|
||||||
(long)linebuf_count, (long)linebuf_memory_used);
|
linebuf_count, linebuf_memory_used);
|
||||||
|
|
||||||
count_scache(&number_servers_cached, &mem_servers_cached);
|
count_scache(&number_servers_cached, &mem_servers_cached);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :scache %ld(%ld)",
|
"z :scache %zu(%zu)",
|
||||||
(long)number_servers_cached, (long)mem_servers_cached);
|
number_servers_cached, mem_servers_cached);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :hostname hash %d(%ld)",
|
"z :hostname hash %d(%lu)",
|
||||||
HOST_MAX, (long)HOST_MAX * sizeof(rb_dlink_list));
|
HOST_MAX, (unsigned long)HOST_MAX * sizeof(rb_dlink_list));
|
||||||
|
|
||||||
total_memory = totww + total_channel_memory + conf_memory +
|
total_memory = totww + total_channel_memory + conf_memory +
|
||||||
class_count * sizeof(struct Class);
|
class_count * sizeof(struct Class);
|
||||||
|
|
||||||
total_memory += mem_servers_cached;
|
total_memory += mem_servers_cached;
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Total: whowas %d channel %d conf %d",
|
"z :Total: whowas %zu channel %zu conf %zu",
|
||||||
(int) totww, (int) total_channel_memory,
|
totww, total_channel_memory,
|
||||||
(int) conf_memory);
|
conf_memory);
|
||||||
|
|
||||||
count_local_client_memory(&local_client_count, &local_client_memory_used);
|
count_local_client_memory(&local_client_count, &local_client_memory_used);
|
||||||
total_memory += local_client_memory_used;
|
total_memory += local_client_memory_used;
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Local client Memory in use: %ld(%ld)",
|
"z :Local client Memory in use: %zu(%zu)",
|
||||||
(long)local_client_count, (long)local_client_memory_used);
|
local_client_count, local_client_memory_used);
|
||||||
|
|
||||||
|
|
||||||
count_remote_client_memory(&remote_client_count, &remote_client_memory_used);
|
count_remote_client_memory(&remote_client_count, &remote_client_memory_used);
|
||||||
total_memory += remote_client_memory_used;
|
total_memory += remote_client_memory_used;
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :Remote client Memory in use: %ld(%ld)",
|
"z :Remote client Memory in use: %zu(%zu)",
|
||||||
(long)remote_client_count,
|
remote_client_count,
|
||||||
(long)remote_client_memory_used);
|
remote_client_memory_used);
|
||||||
|
|
||||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||||
"z :TOTAL: %zu",
|
"z :TOTAL: %zu",
|
||||||
|
|
Loading…
Reference in a new issue