summary refs log tree commit diff
path: root/database.h
diff options
context:
space:
mode:
Diffstat (limited to 'database.h')
-rw-r--r--database.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/database.h b/database.h
index 9fc1fc8..15704f0 100644
--- a/database.h
+++ b/database.h
@@ -41,12 +41,8 @@
 #define SQL(...) #__VA_ARGS__
 #define ARRAY_LEN(a) (sizeof(a) / sizeof((a)[0]))
 
-const char *configPath(
-	char *buf, size_t cap, const char **dirs, const char *path
-);
-const char *dataPath(
-	char *buf, size_t cap, const char **dirs, const char *path
-);
+const char *configPath(const char **dirs, const char *path);
+const char *dataPath(const char **dirs, const char *path);
 FILE *configOpen(const char *path, const char *mode);
 FILE *dataOpen(const char *path, const char *mode);
 void dataMkdir(const char *path);
@@ -122,9 +118,8 @@ static inline void dbFind(const char *path, int flags) {
 		dataMkdir("");
 	}
 
-	char buf[PATH_MAX];
 	const char *dirs = NULL;
-	while (NULL != (path = dataPath(buf, sizeof(buf), &dirs, DatabasePath))) {
+	while (NULL != (path = dataPath(&dirs, DatabasePath))) {
 		dbOpen(path, flags);
 		if (db) return;
 	}