diff options
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 ; } |