summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs6dns/s6dns_hosts_compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs6dns/s6dns_hosts_compile.c b/src/libs6dns/s6dns_hosts_compile.c
index c0bba5b..499bb9d 100644
--- a/src/libs6dns/s6dns_hosts_compile.c
+++ b/src/libs6dns/s6dns_hosts_compile.c
@@ -286,12 +286,12 @@ static int name_write_iter (void *data, void *aux)
hdcm *blah = aux ;
struct iovec kv[3] = { { .iov_base = blah->key, .iov_len = 2 }, { .iov_base = ":", .iov_len = 1 }, { .iov_base = blah->hd->storage.s + node->pos, .iov_len = strlen(blah->hd->storage.s + node->pos) } } ;
struct iovec dv = { .iov_base = node->ipv4.s, .iov_len = node->ipv4.len } ;
- if (node->ipv4.len && !cdbmake_addv(blah->cm, kv, 2, &dv, 1)) return 0 ;
+ if (node->ipv4.len && !cdbmake_addv(blah->cm, kv, 3, &dv, 1)) return 0 ;
if (node->ipv6.len)
{
blah->key[1] = '6' ;
dv.iov_base = node->ipv6.s ; dv.iov_len = node->ipv6.len ;
- if (!cdbmake_addv(blah->cm, kv, 2, &dv, 1)) return 0 ;
+ if (!cdbmake_addv(blah->cm, kv, 3, &dv, 1)) return 0 ;
blah->key[1] = '4' ;
}
return 1 ;