diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-11 16:09:55 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-11 16:09:55 +0000 |
commit | 5ad27a3dc4b957191e2e657d41656810138ba789 (patch) | |
tree | 07e7e00ab43b74d6a3fdff9ad80e93882921adfa /src/libs6dns/s6dns_fmt_hinfo.c | |
parent | f417b72c9489cd7c20b94eb8904a8911b7f6fd15 (diff) | |
download | s6-dns-5ad27a3dc4b957191e2e657d41656810138ba789.tar.xz |
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/libs6dns/s6dns_fmt_hinfo.c')
-rw-r--r-- | src/libs6dns/s6dns_fmt_hinfo.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libs6dns/s6dns_fmt_hinfo.c b/src/libs6dns/s6dns_fmt_hinfo.c index 2389926..78bf414 100644 --- a/src/libs6dns/s6dns_fmt_hinfo.c +++ b/src/libs6dns/s6dns_fmt_hinfo.c @@ -1,16 +1,15 @@ /* ISC license. */ -#include <sys/types.h> +#include <string.h> #include <errno.h> -#include <skalibs/bytestr.h> #include <s6-dns/s6dns-message.h> #include <s6-dns/s6dns-fmt.h> size_t s6dns_fmt_hinfo (char *s, size_t max, s6dns_message_rr_hinfo_t const *hinfo) { if (hinfo->cpu.len + 1 + hinfo->os.len > max) return (errno = ENAMETOOLONG, 0) ; - byte_copy(s, hinfo->cpu.len, hinfo->cpu.s) ; + memcpy(s, hinfo->cpu.s, hinfo->cpu.len) ; s[hinfo->cpu.len] = ' ' ; - byte_copy(s + hinfo->cpu.len + 1, hinfo->os.len, hinfo->os.s) ; + memcpy(s + hinfo->cpu.len + 1, hinfo->os.s, hinfo->os.len) ; return hinfo->cpu.len + 1 + hinfo->os.len ; } |