about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-24 21:43:05 -0400
committerJune McEnroe <june@causal.agency>2020-08-24 21:54:17 -0400
commit911fd8948ffd2cd4231e95c18ca7821ef886d328 (patch)
tree59711385e6836a6ffb9968c6d98e6a9baf32187b
parentImport xdg.c from catgirl (diff)
downloadpounce-911fd8948ffd2cd4231e95c18ca7821ef886d328.tar.gz
pounce-911fd8948ffd2cd4231e95c18ca7821ef886d328.zip
Use configOpen in getopt_config
-rw-r--r--config.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/config.c b/config.c
index 4c58624..958ee45 100644
--- a/config.c
+++ b/config.c
@@ -64,11 +64,8 @@ int getopt_config(
 			if (optind < argc) {
 				num = 0;
 				path = argv[optind++];
-				file = fopen(path, "r");
-				if (!file) {
-					warn("%s", path);
-					return clean('?');
-				}
+				file = configOpen(path, "r");
+				if (!file) return clean('?');
 			} else {
 				return clean(-1);
 			}