From c60ebd422171808ad58b936914055397bb205bef Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 12 Mar 2017 11:59:43 +0000 Subject: Adapt to skalibs-2.5.0.0 --- src/libs6/s6_svc_writectl.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/libs6/s6_svc_writectl.c') diff --git a/src/libs6/s6_svc_writectl.c b/src/libs6/s6_svc_writectl.c index 26c0fb6..b4d8e15 100644 --- a/src/libs6/s6_svc_writectl.c +++ b/src/libs6/s6_svc_writectl.c @@ -1,17 +1,16 @@ /* ISC license. */ -#include -#include +#include #include int s6_svc_writectl (char const *service, char const *subdir, char const *s, size_t len) { - size_t svlen = str_len(service) ; - size_t sublen = str_len(subdir) ; + size_t svlen = strlen(service) ; + size_t sublen = strlen(subdir) ; char fn[svlen + sublen + 10] ; - byte_copy(fn, svlen, service) ; + memcpy(fn, service, svlen) ; fn[svlen] = '/' ; - byte_copy(fn + svlen + 1, sublen, subdir) ; - byte_copy(fn + svlen + 1 + sublen, 9, "/control") ; + memcpy(fn + svlen + 1, subdir, sublen) ; + memcpy(fn + svlen + 1 + sublen, "/control", 9) ; return s6_svc_write(fn, s, len) ; } -- cgit v1.2.3