commit 7b34b878ea194e6fa085be08ba9afb6801f9cda2
parent 44ba628725264b6445d680833aa0616394b07240
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Tue, 10 Mar 2015 20:06:01 +0100
use NULL for default in cmd_msg
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/irctk.c b/irctk.c
@@ -1315,7 +1315,7 @@ void cmd_msg(char *full_line, char *target, char *line)
}
/* Manage the fact that target may be "" */
- if (!target[0]) {
+ if (!target) {
debug("have to infer destination\n");
switch(args.default_destination) {
case DEFAULT_FIRST:
@@ -1830,8 +1830,8 @@ static void* fifo_in_thread (void *arg) {
strncpy(args.last_chans_out, target, MAX_CHANS_LEN-1);
} else {
/* No target specified, we attempt the default */
- debug("[thread_in] calling with line target msg %p %p %p\n", line, "", line);
- cmd_msg(line, "", line);
+ debug("[thread_in] calling with line target msg %p %p %p\n", line, NULL, line);
+ cmd_msg(line, NULL, line);
}
// reallocate line, the popper will free the line