Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/commands.c @ 2326:54b4272de463
Silence compiler warnings (-Wformat-truncation, -Wstringop-truncation)
author | Michał Kępień <bitbucket@kempniu.pl> |
---|---|
date | Fri, 28 Sep 2018 06:45:58 +0200 |
parents | a62bbd4d7061 |
children | 8ecc28068748 |
comparison
equal
deleted
inserted
replaced
2325:c5665d3191aa | 2326:54b4272de463 |
---|---|
1980 } | 1980 } |
1981 if (rst_time) { | 1981 if (rst_time) { |
1982 char tbuf[128]; | 1982 char tbuf[128]; |
1983 | 1983 |
1984 strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", localtime(&rst_time)); | 1984 strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", localtime(&rst_time)); |
1985 snprintf(buffer, 127, "Status timestamp: %s", tbuf); | 1985 snprintf(buffer, 4095, "Status timestamp: %s", tbuf); |
1986 scr_WriteIncomingMessage(bjid, buffer, | 1986 scr_WriteIncomingMessage(bjid, buffer, |
1987 0, HBB_PREFIX_INFO | HBB_PREFIX_CONT, 0); | 1987 0, HBB_PREFIX_INFO | HBB_PREFIX_CONT, 0); |
1988 } | 1988 } |
1989 #ifdef HAVE_GPGME | 1989 #ifdef HAVE_GPGME |
1990 struct pgp_data *rpgp = buddy_resource_pgp(bud, p_res->data); | 1990 struct pgp_data *rpgp = buddy_resource_pgp(bud, p_res->data); |
3164 | 3164 |
3165 if (rst_time) { | 3165 if (rst_time) { |
3166 char tbuf[128]; | 3166 char tbuf[128]; |
3167 | 3167 |
3168 strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", localtime(&rst_time)); | 3168 strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", localtime(&rst_time)); |
3169 snprintf(buffer, 127, "Timestamp: %s", tbuf); | 3169 snprintf(buffer, 4095, "Timestamp: %s", tbuf); |
3170 scr_WriteIncomingMessage(bjid, buffer, 0, msg_flag | HBB_PREFIX_CONT, 0); | 3170 scr_WriteIncomingMessage(bjid, buffer, 0, msg_flag | HBB_PREFIX_CONT, 0); |
3171 } | 3171 } |
3172 | 3172 |
3173 if (realjid) { | 3173 if (realjid) { |
3174 snprintf(buffer, 4095, "JID : <%s>", realjid); | 3174 snprintf(buffer, 4095, "JID : <%s>", realjid); |