From 74ad46535b87acec38f0a76070d3caf0e9986b6d Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 12 Jun 2021 08:18:20 -0400 Subject: Replaced all log messages with the macros from `macros.h`. This was done not only to make it smaller, and easier to read, but also to make it easier for debugging. --- config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config.c') diff --git a/config.c b/config.c index 0454b8b..6b1da23 100644 --- a/config.c +++ b/config.c @@ -4,6 +4,7 @@ #include #include #include "config.h" +#include "macros.h" char *read_file(const char *filename, long *size) { /* Open the file. */ @@ -153,7 +154,7 @@ config *parse_config(const char *filename) { if (opt->offset == offsetof(config, port)) { const int port = strtol(val.str, NULL, 0); if (port <= 0 || port > 65535) { - syslog(LOG_ERR, "Invalid port %d. (Valid port must be between 1, and 65535.)", port); + log(LOG_ERR, "Invalid port %d. (Valid port must be between 1, and 65535.)", port); cleanup_config(cfg); free(line); free(buf); -- cgit v1.2.3-13-gbd6f