aboutsummaryrefslogtreecommitdiff
path: root/kike.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-06-02 22:47:25 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-06-02 22:47:25 +0200
commitb132b979da9f7afeee4f3f4fb9720a16f38c5868 (patch)
tree5e5ffbb00084986d4b381ee0a54d4847eb483b57 /kike.c
parent4dd2a80ba22654231c1e2bfef521eca4840e62a5 (diff)
downloadxK-b132b979da9f7afeee4f3f4fb9720a16f38c5868.tar.gz
xK-b132b979da9f7afeee4f3f4fb9720a16f38c5868.tar.xz
xK-b132b979da9f7afeee4f3f4fb9720a16f38c5868.zip
kike: avoid printf-ing a null string
Diffstat (limited to 'kike.c')
-rw-r--r--kike.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kike.c b/kike.c
index 8400e45..a197c5c 100644
--- a/kike.c
+++ b/kike.c
@@ -827,7 +827,8 @@ client_close_link (struct client *c, const char *reason)
// it, with some arbitrary timeout. The `closing_link' state makes sure
// that a/ we ignore any successive messages, and b/ that the connection
// is killed after the write buffer is transferred and emptied.
- client_send (c, "ERROR :Closing Link: %s[%s] (%s)", c->nickname,
+ client_send (c, "ERROR :Closing Link: %s[%s] (%s)",
+ c->nickname ? c->nickname : "",
c->hostname /* TODO host IP? */, reason);
c->closing_link = true;