From 3afaf3d8f7617beed427c96e544ab177fabadaa4 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Wed, 24 Jun 2020 00:16:51 +0200 Subject: Simplify config_parse_header --- minecproxy/main.c | 4 ++-- minecproxy/server-config.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'minecproxy') diff --git a/minecproxy/main.c b/minecproxy/main.c index bbe3fad..3c996ad 100644 --- a/minecproxy/main.c +++ b/minecproxy/main.c @@ -298,8 +298,8 @@ cfg_read() *pos = '\0'; pos = buf; - if (!config_parse_header(path, "mcproxy", &pos)) - die("main config file (%s) invalid", path); + if (!config_parse_header("mcproxy", &pos)) + die("main config file (%s) missing/invalid header", path); while (true) { int key; diff --git a/minecproxy/server-config.c b/minecproxy/server-config.c index 4e16155..e7cc422 100644 --- a/minecproxy/server-config.c +++ b/minecproxy/server-config.c @@ -154,8 +154,10 @@ scfg_parse(struct server *server) pos = server->tbuf.buf; - if (!config_parse_header(server->name, SERVER_CFG_HEADER, &pos)) + if (!config_parse_header(SERVER_CFG_HEADER, &pos)) { + verbose("%s: missing/invalid header", server->name); return; + } while (true) { int key; -- cgit v1.2.3