From cd3626642755359eecf64d05e3f9db3d8b00ed24 Mon Sep 17 00:00:00 2001 From: wrmr Date: Fri, 8 Nov 2024 23:30:42 -0500 Subject: use strv_t even more --- doc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc.c') 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++; } -- cgit 1.4.1-2-gfad0