diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-12 11:59:43 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-12 11:59:43 +0000 |
commit | c60ebd422171808ad58b936914055397bb205bef (patch) | |
tree | 7db3e5728d72ad209f8e22b9eb9f337e0b0c3e58 /src/conn-tools/s6-ipcclient.c | |
parent | e28fe5908a91d8795ca9923d64eeed7d3e898434 (diff) | |
download | s6-c60ebd422171808ad58b936914055397bb205bef.tar.xz |
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/conn-tools/s6-ipcclient.c')
-rw-r--r-- | src/conn-tools/s6-ipcclient.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/conn-tools/s6-ipcclient.c b/src/conn-tools/s6-ipcclient.c index 384fca0..a8c6075 100644 --- a/src/conn-tools/s6-ipcclient.c +++ b/src/conn-tools/s6-ipcclient.c @@ -1,6 +1,6 @@ /* ISC license. */ -#include <sys/types.h> +#include <string.h> #include <skalibs/sgetopt.h> #include <skalibs/strerr2.h> #include <skalibs/env.h> @@ -19,7 +19,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, "qQvp:l:", &l) ; + int opt = subgetopt_r(argc, argv, "qQvp:l:", &l) ; if (opt == -1) break ; switch (opt) { @@ -46,16 +46,16 @@ int main (int argc, char const *const *argv, char const *const *envp) if (verbosity >= 2) strerr_warn3x(PROG, ": connected to ", argv[0]) ; if (localname) { - register size_t n = str_len(localname) ; + size_t n = strlen(localname) ; if (n > IPCPATH_MAX) n = IPCPATH_MAX ; - byte_copy(modif + i, n, localname) ; + memcpy(modif + i, localname, n) ; i += n ; modif[i++] = 0 ; } else { int dummy ; if (ipc_local(s, modif + i, IPCPATH_MAX, &dummy) < 0) modif[--i] = 0 ; - else i += str_len(modif + i) + 1 ; + else i += strlen(modif + i) + 1 ; } if (fd_move(6, s) < 0) strerr_diefu2sys(111, "set up fd ", "6") ; |