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/fdholder/s6-fdholder-setdumpc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/fdholder/s6-fdholder-setdumpc.c') diff --git a/src/fdholder/s6-fdholder-setdumpc.c b/src/fdholder/s6-fdholder-setdumpc.c index 5c80fd7..ff01384 100644 --- a/src/fdholder/s6-fdholder-setdumpc.c +++ b/src/fdholder/s6-fdholder-setdumpc.c @@ -1,8 +1,7 @@ /* ISC license. */ -#include -#include -#include +#include +#include #include #include #include @@ -24,7 +23,7 @@ int main (int argc, char const *const *argv, char const *const *envp) subgetopt_t l = SUBGETOPT_ZERO ; for (;;) { - register int opt = subgetopt_r(argc, argv, "t:", &l) ; + int opt = subgetopt_r(argc, argv, "t:", &l) ; if (opt == -1) break ; switch (opt) { @@ -52,20 +51,20 @@ int main (int argc, char const *const *argv, char const *const *envp) { size_t len ; unsigned int fd ; - byte_copy(s, 6, "S6_FD_") ; + memcpy(s, "S6_FD_", 6) ; s[6 + uint_fmt(s+6, i)] = 0 ; x = env_get2(envp, s) ; if (!x) strerr_dienotset(100, s) ; if (!uint0_scan(x, &fd)) strerr_dieinvalid(100, s) ; dump[i].fd = fd ; - byte_copy(s, 8, "S6_FDID_") ; + memcpy(s, "S6_FDID_", 8) ; s[8 + uint_fmt(s+8, i)] = 0 ; x = env_get2(envp, s) ; if (!x) strerr_dienotset(100, s) ; - len = str_len(x) ; + len = strlen(x) ; if (!len || len > S6_FDHOLDER_ID_SIZE) strerr_dieinvalid(100, s) ; - byte_copy(dump[i].id, len+1, x) ; - byte_copy(s, 11, "S6_FDLIMIT_") ; + memcpy(dump[i].id, x, len+1) ; + memcpy(s, "S6_FDLIMIT_", 11) ; s[11 + uint_fmt(s+11, i)] = 0 ; x = env_get2(envp, s) ; if (!x) tain_add_g(&dump[i].limit, &tain_infinite_relative) ; -- cgit v1.2.3