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/conn-tools/s6-connlimit.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/conn-tools/s6-connlimit.c') diff --git a/src/conn-tools/s6-connlimit.c b/src/conn-tools/s6-connlimit.c index 903a777..d7d48c9 100644 --- a/src/conn-tools/s6-connlimit.c +++ b/src/conn-tools/s6-connlimit.c @@ -1,8 +1,7 @@ /* ISC license. */ -#include -#include -#include +#include +#include #include #include #include @@ -14,17 +13,17 @@ int main (int argc, char const *const *argv, char const *const *envp) PROG = "s6-connlimit" ; x = env_get2(envp, "PROTO") ; if (!x) strerr_dienotset(100, "PROTO") ; - protolen = str_len(x) ; + protolen = strlen(x) ; if (!protolen) strerr_dief1x(100, "empty PROTO") ; { unsigned int num ; char s[protolen + 8] ; - byte_copy(s, protolen, x) ; - byte_copy(s + protolen, 8, "CONNNUM") ; + memcpy(s, x, protolen) ; + memcpy(s + protolen, "CONNNUM", 8) ; x = env_get2(envp, s) ; if (!x) strerr_dienotset(100, s) ; if (!uint0_scan(x, &num)) strerr_dief2x(100, "invalid ", s) ; - byte_copy(s + protolen + 4, 4, "MAX") ; + memcpy(s + protolen + 4, "MAX", 4) ; x = env_get2(envp, s) ; if (x) { -- cgit v1.2.3