summary refs log tree commit diff
path: root/doc.c
diff options
context:
space:
mode:
authorwrmr2024-11-08 23:30:42 -0500
committerwrmr2024-11-08 23:30:42 -0500
commitcd3626642755359eecf64d05e3f9db3d8b00ed24 (patch)
treee7270b2c779c7aeb0c1b88ed2dee67d4c264854a /doc.c
parent012ed5bd6455ce291741ad540a5e356e4810133b (diff)
use strv_t even more
Diffstat (limited to 'doc.c')
-rw-r--r--doc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc.c b/doc.c
index d43ff30..aa18369 100644
--- a/doc.c
+++ b/doc.c
@@ -51,8 +51,9 @@ void doc_add_text(struct doc *d, strv_t s) {
 	dl->len += s.n;
 }
 
-unsigned short doc_add_link(struct doc *d, const char *url) {
-	buf_cat(&d->lnk, url, strlen(url) + 1);
+unsigned short doc_add_link(struct doc *d, strv_t url) {
+	buf_cat(&d->lnk, url);
+	buf_catc(&d->lnk, 0);
 	return d->linkc++;
 }