summary refs log tree commit diff
path: root/buf.c
diff options
context:
space:
mode:
authorwrmr2024-11-08 23:30:42 -0500
committerwrmr2024-11-08 23:30:42 -0500
commitcd3626642755359eecf64d05e3f9db3d8b00ed24 (patch)
treee7270b2c779c7aeb0c1b88ed2dee67d4c264854a /buf.c
parent012ed5bd6455ce291741ad540a5e356e4810133b (diff)
use strv_t even more
Diffstat (limited to 'buf.c')
-rw-r--r--buf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/buf.c b/buf.c
index fb3af82..5575bbd 100644
--- a/buf.c
+++ b/buf.c
@@ -25,10 +25,10 @@ void buf_grow(buf_t *b, size_t n) {
 	}
 }
 
-void buf_cat(buf_t *b, const char *src, size_t n) {
-	buf_grow(b, n);
-	memcpy(&b->buf[b->sz], src, n);
-	b->sz += n;
+void buf_cat(buf_t *b, strv_t s) {
+	buf_grow(b, s.n);
+	memcpy(&b->buf[b->sz], s.s, s.n);
+	b->sz += s.n;
 }
 
 void buf_catc(buf_t *b, char c) {