summaryrefslogtreecommitdiffstats
path: root/cfg.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-11-27 22:59:34 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-11-27 22:59:34 +0000
commit8264e92b3797cda37cc6610ddc26138ba46e2832 (patch)
treeb297c601f499c2e8e9f83ce7e105f27f67c9db07 /cfg.c
parent47c097cb51da9622180963af5391d142e7d4ade3 (diff)
Fix return value of load_cfg, from Thomas Adam.
Diffstat (limited to 'cfg.c')
-rw-r--r--cfg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cfg.c b/cfg.c
index 3da6ea4d..b64a4d6a 100644
--- a/cfg.c
+++ b/cfg.c
@@ -73,7 +73,7 @@ cfg_add_cause(struct causelist *causes, const char *fmt, ...)
* Load configuration file. Returns -1 for an error with a list of messages in
* causes. Note that causes must be initialised by the caller!
*/
-int
+enum cmd_retval
load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
{
FILE *f;
@@ -86,7 +86,7 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
if ((f = fopen(path, "rb")) == NULL) {
cfg_add_cause(causes, "%s: %s", path, strerror(errno));
- return (-1);
+ return (CMD_RETURN_ERROR);
}
n = 0;