summaryrefslogtreecommitdiff
path: root/chat.c
diff options
context:
space:
mode:
authorC. McEnroe2020-02-10 19:57:10 -0500
committerC. McEnroe2020-02-10 19:57:10 -0500
commit99480a42e56e70707822934ffeb56f0454afc127 (patch)
tree798c7d1bc8193dccc745682cb4e76d60610fb2ed /chat.c
parente6c18403e22bde5a785b7172903f640d03cb8a35 (diff)
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);