1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 06:46:38 +02:00

core: fix cast of time_t (to "long long" instead of "long") (closes #1051)

This commit is contained in:
Sébastien Helleu
2017-08-12 18:36:45 +02:00
parent 6e366095f9
commit aeeec38d6f
24 changed files with 66 additions and 65 deletions
+4 -4
View File
@@ -1784,11 +1784,11 @@ relay_client_print_log ()
relay_protocol_string[ptr_client->protocol]);
weechat_log_printf (" protocol_string . . . : '%s'", ptr_client->protocol_string);
weechat_log_printf (" protocol_args . . . . : '%s'", ptr_client->protocol_args);
weechat_log_printf (" listen_start_time . . : %ld", ptr_client->listen_start_time);
weechat_log_printf (" start_time. . . . . . : %ld", ptr_client->start_time);
weechat_log_printf (" end_time. . . . . . . : %ld", ptr_client->end_time);
weechat_log_printf (" listen_start_time . . : %lld", (long long)ptr_client->listen_start_time);
weechat_log_printf (" start_time. . . . . . : %lld", (long long)ptr_client->start_time);
weechat_log_printf (" end_time. . . . . . . : %lld", (long long)ptr_client->end_time);
weechat_log_printf (" hook_fd . . . . . . . : 0x%lx", ptr_client->hook_fd);
weechat_log_printf (" last_activity . . . . : %ld", ptr_client->last_activity);
weechat_log_printf (" last_activity . . . . : %lld", (long long)ptr_client->last_activity);
weechat_log_printf (" bytes_recv. . . . . . : %llu", ptr_client->bytes_recv);
weechat_log_printf (" bytes_sent. . . . . . : %llu", ptr_client->bytes_sent);
weechat_log_printf (" recv_data_type. . . . : %d (%s)",
+2 -2
View File
@@ -761,8 +761,8 @@ relay_server_print_log ()
weechat_log_printf (" ssl . . . . . . . . . : %d", ptr_server->ssl);
weechat_log_printf (" sock. . . . . . . . . : %d", ptr_server->sock);
weechat_log_printf (" hook_fd . . . . . . . : 0x%lx", ptr_server->hook_fd);
weechat_log_printf (" start_time. . . . . . : %ld", ptr_server->start_time);
weechat_log_printf (" last_client_disconnect: %ld", ptr_server->last_client_disconnect);
weechat_log_printf (" start_time. . . . . . : %lld", (long long)ptr_server->start_time);
weechat_log_printf (" last_client_disconnect: %lld", (long long)ptr_server->last_client_disconnect);
weechat_log_printf (" prev_server . . . . . : 0x%lx", ptr_server->prev_server);
weechat_log_printf (" next_server . . . . . : 0x%lx", ptr_server->next_server);
}
@@ -242,7 +242,7 @@ relay_weechat_msg_add_time (struct t_relay_weechat_msg *msg, time_t time)
char str_time[128];
unsigned char length;
snprintf (str_time, sizeof (str_time), "%ld", (long)time);
snprintf (str_time, sizeof (str_time), "%lld", (long long)time);
length = strlen (str_time);
relay_weechat_msg_add_bytes (msg, &length, 1);
relay_weechat_msg_add_bytes (msg, str_time, length);