about summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-10 19:57:10 -0500
committerJune McEnroe <june@causal.agency>2020-02-10 19:57:10 -0500
commit99480a42e56e70707822934ffeb56f0454afc127 (patch)
tree798c7d1bc8193dccc745682cb4e76d60610fb2ed /chat.c
parentLeave a blank line after loaded buffer (diff)
downloadcatgirl-99480a42e56e70707822934ffeb56f0454afc127.tar.gz
catgirl-99480a42e56e70707822934ffeb56f0454afc127.zip
Factor out XDG base directory code
And add warnings to configOpen, since that's the only way to be accurate
if a weird error occurs.
Diffstat (limited to 'chat.c')
-rw-r--r--chat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chat.c b/chat.c
index e8713bb..1ae7090 100644
--- a/chat.c
+++ b/chat.c
@@ -154,11 +154,11 @@ int main(int argc, char *argv[]) {
 	FILE *privFile = NULL;
 	if (cert) {
 		certFile = configOpen(cert, "r");
-		if (!certFile) err(EX_NOINPUT, "%s", cert);
+		if (!certFile) return EX_NOINPUT;
 	}
 	if (priv) {
 		privFile = configOpen(priv, "r");
-		if (!privFile) err(EX_NOINPUT, "%s", priv);
+		if (!privFile) return EX_NOINPUT;
 	}
 	ircConfig(insecure, certFile, privFile);
 	if (certFile) fclose(certFile);