From 006d34eeaeb9b50d47dabebeee682140b0db8f7b Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Thu, 21 Jun 2018 22:02:26 +0200 Subject: degesch: fix some log messages We could use some static analysis for these. --- degesch.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/degesch.c b/degesch.c index 015c33c..21794f4 100644 --- a/degesch.c +++ b/degesch.c @@ -4895,7 +4895,7 @@ irc_initiate_disconnect (struct server *s, const char *reason) // It can take a very long time for sending QUIT to take effect if (s->manual_disconnect) { - log_server_error (s, s->buffer, "%s: %s", "Disconnected from server", + log_server_error (s, s->buffer, "#s: #s", "Disconnected from server", "connection torn down early per user request"); irc_disconnect (s); return; @@ -4946,7 +4946,7 @@ on_irc_ping_timeout (void *user_data) { struct server *s = user_data; log_server_error (s, s->buffer, - "%s: %s", "Disconnected from server", "timeout"); + "#s: #s", "Disconnected from server", "timeout"); irc_disconnect (s); } @@ -11910,7 +11910,7 @@ expand_alias (struct app_context *ctx, if (!config_item_type_is_string (entry->type)) { - log_global_error (ctx, "Error executing `/%s': %s", + log_global_error (ctx, "Error executing `/#s': #s", alias_name, "alias definition is not a string"); return false; } @@ -13512,8 +13512,8 @@ process_bracketed_paste (const struct pollfd *fd, struct app_context *ctx) // Avoid endless flooding of the buffer if (text_len > BRACKETED_PASTE_LIMIT) - log_global_error (ctx, "Paste trimmed to %zu bytes", - (text_len = BRACKETED_PASTE_LIMIT)); + log_global_error (ctx, "Paste trimmed to #d bytes", + (int) (text_len = BRACKETED_PASTE_LIMIT)); buf->str[text_len] = '\0'; if (CALL_ (ctx->input, insert, buf->str)) -- cgit v1.2.3-70-g09d2