summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@0x90.dk>2015-09-20 23:11:39 +0200
committerAlexander Færøy <ahf@0x90.dk>2015-09-20 23:11:39 +0200
commita44c4b82de44af9aec59c542f3212795ecc52b57 (patch)
tree97efb04962b7936b0ab270aebfbaa72ad0a7f447 /src/irc/core
parent5c3ef84a0ba3cde0d9e2586fcb618d81851776f5 (diff)
downloadirssi-a44c4b82de44af9aec59c542f3212795ecc52b57.zip
More format warnings removed.
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/irc-channels.c12
-rw-r--r--src/irc/core/servers-redirect.c8
2 files changed, 12 insertions, 8 deletions
diff --git a/src/irc/core/irc-channels.c b/src/irc/core/irc-channels.c
index add18acf..682be4c2 100644
--- a/src/irc/core/irc-channels.c
+++ b/src/irc/core/irc-channels.c
@@ -146,11 +146,13 @@ static void irc_channels_join(IRC_SERVER_REC *server, const char *data,
continue;
}
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);
+ g_string_truncate(outchans, outchans->len - 1);
+ g_string_truncate(outkeys, outkeys->len - 1);
+
+ 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);
diff --git a/src/irc/core/servers-redirect.c b/src/irc/core/servers-redirect.c
index f0a285df..aeb9c010 100644
--- a/src/irc/core/servers-redirect.c
+++ b/src/irc/core/servers-redirect.c
@@ -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);