From af9bd15af7f25b72915ea89c5ec8c8c0501ad73a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 5 Mar 2012 17:33:36 +0100 Subject: [PATCH] xbps_init: set xhp->conffile to NULL if conf file cannot be read. --- lib/initend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/initend.c b/lib/initend.c index 28cce481..c5158542 100644 --- a/lib/initend.c +++ b/lib/initend.c @@ -130,7 +130,7 @@ xbps_init(struct xbps_handle *xh) */ return rv; } - errno = 0; + xhp->conffile = NULL; } else if (rv == CFG_PARSE_ERROR) { /* * Parser error from configuration file. @@ -139,7 +139,7 @@ xbps_init(struct xbps_handle *xh) } } xbps_dbg_printf("Configuration file: %s\n", - xhp->conffile ? xhp->conffile : "unset"); + xhp->conffile ? xhp->conffile : "not found"); /* * Respect client setting in struct xbps_handle for {root,cache}dir; * otherwise use values from configuration file or defaults if unset.