summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-12 08:18:20 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-12 08:18:20 -0400
commit74ad46535b87acec38f0a76070d3caf0e9986b6d (patch)
treeef64eb3781cb8a0a568ed07e08be871e2868074d /config.c
parent169463df0e28d011988d3f9fe16af3b7a2db2db9 (diff)
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.
Diffstat (limited to 'config.c')
-rw-r--r--config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/config.c b/config.c
index 0454b8b..6b1da23 100644
--- a/config.c
+++ b/config.c
@@ -4,6 +4,7 @@
#include <string.h>
#include <syslog.h>
#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);