summary refs log tree commit diff
path: root/irc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--irc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/irc.c b/irc.c
index b87351c..5acc69f 100644
--- a/irc.c
+++ b/irc.c
@@ -27,7 +27,6 @@
 
 #include <assert.h>
 #include <err.h>
-#include <limits.h>
 #include <netdb.h>
 #include <netinet/in.h>
 #include <stdarg.h>
@@ -61,12 +60,9 @@ void ircConfig(bool insecure, const char *cert, const char *priv) {
 		tls_config_insecure_noverifyname(config);
 	}
 
-	const char *path;
-	const char *dirs;
-	char buf[PATH_MAX];
 	if (cert) {
-		dirs = NULL;
-		while (NULL != (path = configPath(buf, sizeof(buf), &dirs, cert))) {
+		const char *dirs = NULL;
+		for (const char *path; NULL != (path = configPath(&dirs, cert));) {
 			if (priv) {
 				error = tls_config_set_cert_file(config, path);
 			} else {
@@ -77,8 +73,8 @@ void ircConfig(bool insecure, const char *cert, const char *priv) {
 		if (error) errx(EX_NOINPUT, "%s: %s", cert, tls_config_error(config));
 	}
 	if (priv) {
-		dirs = NULL;
-		while (NULL != (path = configPath(buf, sizeof(buf), &dirs, priv))) {
+		const char *dirs = NULL;
+		for (const char *path; NULL != (path = configPath(&dirs, priv));) {
 			error = tls_config_set_key_file(config, path);
 			if (!error) break;
 		}
e='2018-09-11 08:47:12 +0200'>2018-09-11ui-shared: ban strcat()Christian Hesse 2018-09-11ui-patch: ban sprintf()Christian Hesse 2018-09-11ui-log: ban strncpy()Christian Hesse 2018-09-11ui-log: ban strcpy()Christian Hesse 2018-09-11parsing: ban sprintf()Christian Hesse 2018-09-11parsing: ban strncpy()Christian Hesse 2018-08-28filters: generate anchor links from markdownChristian Hesse 2018-08-03Bump version.Jason A. Donenfeld 2018-08-03clone: fix directory traversalJason A. Donenfeld 2018-08-03config: record repo.snapshot-prefix in the per-repo configKonstantin Ryabitsev