1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

More format warnings removed.

This commit is contained in:
Alexander Færøy 2015-09-20 23:11:39 +02:00
parent 5c3ef84a0b
commit a44c4b82de
No known key found for this signature in database
GPG Key ID: E15081D5D3C3DB53
3 changed files with 17 additions and 10 deletions

View File

@ -326,8 +326,11 @@ static void autoconnect_servers(void)
if (autocon_server != NULL) {
/* connect to specified server */
str = g_strdup_printf(autocon_password == NULL ? "%s %d" : "%s %d %s",
autocon_server, autocon_port, autocon_password);
if (autocon_password == NULL)
str = g_strdup_printf("%s %d", autocon_server, autocon_port);
else
str = g_strdup_printf("%s %d %s", autocon_server, autocon_port, autocon_password);
signal_emit("command connect", 1, str);
g_free(str);
return;

View File

@ -148,9 +148,11 @@ static void irc_channels_join(IRC_SERVER_REC *server, const char *data,
if (outchans->len > 0) {
g_string_truncate(outchans, outchans->len - 1);
g_string_truncate(outkeys, outkeys->len - 1);
irc_send_cmdv(IRC_SERVER(server),
use_keys ? "JOIN %s %s" : "JOIN %s",
outchans->str, outkeys->str);
if (use_keys)
irc_send_cmdv(IRC_SERVER(server), "JOIN %s %s", outchans->str, outkeys->str);
else
irc_send_cmdv(IRC_SERVER(server), "JOIN %s", outchans->str);
}
cmdlen = 0;
g_string_truncate(outchans,0);

View File

@ -433,9 +433,11 @@ static void redirect_abort(IRC_SERVER_REC *server, REDIRECT_REC *rec)
if (rec->aborted || !rec->destroyed) {
/* emit the failure signal */
str = g_strdup_printf(rec->failure_signal != NULL ?
"FAILED %s: %s" : "FAILED %s",
rec->cmd->name, rec->failure_signal);
if (rec->failure_signal != NULL)
str = g_strdup_printf("FAILED %s: %s", rec->cmd->name, rec->failure_signal);
else
str = g_strdup_printf("FAILED %s", rec->cmd->name);
rawlog_redirect(server->rawlog, str);
g_free(str);