From 52847a951802fda7a3ce36cdac77c34914b0ccca Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 15 Jan 2017 22:00:56 +0000 Subject: It is silly for cmd_list_parse to return an integer error when it could just return NULL. --- cfg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cfg.c') diff --git a/cfg.c b/cfg.c index 8424bb20..2be34fda 100644 --- a/cfg.c +++ b/cfg.c @@ -141,7 +141,8 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int quiet) if (condition == -1) continue; - if (cmd_string_parse(p, &cmdlist, path, line, &cause1) != 0) { + cmdlist = cmd_string_parse(p, path, line, &cause1); + if (cmdlist == NULL) { free(buf); if (cause1 == NULL) continue; -- cgit v1.2.3