degesch: fix some log messages

We could use some static analysis for these.
This commit is contained in:
Přemysl Eric Janouch 2018-06-21 22:02:26 +02:00
parent 19400ee8b7
commit 006d34eeae
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 5 additions and 5 deletions

View File

@ -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 // It can take a very long time for sending QUIT to take effect
if (s->manual_disconnect) 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"); "connection torn down early per user request");
irc_disconnect (s); irc_disconnect (s);
return; return;
@ -4946,7 +4946,7 @@ on_irc_ping_timeout (void *user_data)
{ {
struct server *s = user_data; struct server *s = user_data;
log_server_error (s, s->buffer, log_server_error (s, s->buffer,
"%s: %s", "Disconnected from server", "timeout"); "#s: #s", "Disconnected from server", "timeout");
irc_disconnect (s); irc_disconnect (s);
} }
@ -11910,7 +11910,7 @@ expand_alias (struct app_context *ctx,
if (!config_item_type_is_string (entry->type)) 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"); alias_name, "alias definition is not a string");
return false; return false;
} }
@ -13512,8 +13512,8 @@ process_bracketed_paste (const struct pollfd *fd, struct app_context *ctx)
// Avoid endless flooding of the buffer // Avoid endless flooding of the buffer
if (text_len > BRACKETED_PASTE_LIMIT) if (text_len > BRACKETED_PASTE_LIMIT)
log_global_error (ctx, "Paste trimmed to %zu bytes", log_global_error (ctx, "Paste trimmed to #d bytes",
(text_len = BRACKETED_PASTE_LIMIT)); (int) (text_len = BRACKETED_PASTE_LIMIT));
buf->str[text_len] = '\0'; buf->str[text_len] = '\0';
if (CALL_ (ctx->input, insert, buf->str)) if (CALL_ (ctx->input, insert, buf->str))