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 --- net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net.c') diff --git a/net.c b/net.c index b3f0655..0d6604e 100644 --- a/net.c +++ b/net.c @@ -132,7 +132,7 @@ static int fetch_file(const struct addr *adr, struct buf *buf, enum doc_type *do buf_init(buf, 1024); char b[256]; while (fgets(b, sizeof b, f)) { - buf_cat(buf, b, strlen(b)); + buf_cat(buf, strv(b)); } buf_catc(buf, 0); fclose(f); @@ -184,7 +184,7 @@ static int fetch_gopher(const struct addr *adr, struct buf *buf, enum doc_type * return -1; } if (!n) break; - buf_cat(buf, inbuf, n); + buf_cat(buf, (strv_t) { inbuf, n }); } close(s); return 0; -- cgit 1.4.1-2-gfad0