From 9b73d152fe471bc2ec620a07116bf6207857d4e5 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Sat, 19 Feb 2022 00:34:06 +0100 Subject: [PATCH] use gint64 define --- src/fe-common/irc/fe-ctcp.c | 5 ++++- src/irc/core/irc-commands.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/fe-common/irc/fe-ctcp.c b/src/fe-common/irc/fe-ctcp.c index c73399be..14893966 100644 --- a/src/fe-common/irc/fe-ctcp.c +++ b/src/fe-common/irc/fe-ctcp.c @@ -128,7 +128,10 @@ static void ctcp_ping_reply(IRC_SERVER_REC *server, const char *data, g_return_if_fail(data != NULL); - if (sscanf(data, "%ld %ld", &tv, &tv2) < 1) { + if (sscanf(data, + "%" G_GINT64_FORMAT " " + "%" G_GINT64_FORMAT, + &tv, &tv2) < 1) { char *tmp = g_strconcat("PING ", data, NULL); ctcp_default_reply(server, tmp, nick, addr, target); g_free(tmp); diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index cba909c1..5f234c54 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -544,7 +544,10 @@ static void cmd_ping(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item tv = g_get_real_time(); - str = g_strdup_printf("%s PING %ld %ld", data, tv / G_TIME_SPAN_SECOND, tv % G_TIME_SPAN_SECOND); + str = g_strdup_printf("%s PING " + "%" G_GINT64_FORMAT " " + "%" G_GINT64_FORMAT, + data, tv / G_TIME_SPAN_SECOND, tv % G_TIME_SPAN_SECOND); signal_emit("command ctcp", 3, str, server, item); g_free(str); }