From 495d625add9e52b29a98c4fa2627a45d20d44849 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 8 Mar 2017 12:17:31 +0000 Subject: Make it build with skalibs-2.5.0.0 --- src/minutils/s6-uevent-spawner.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/minutils/s6-uevent-spawner.c') diff --git a/src/minutils/s6-uevent-spawner.c b/src/minutils/s6-uevent-spawner.c index e6c0927..f220d42 100644 --- a/src/minutils/s6-uevent-spawner.c +++ b/src/minutils/s6-uevent-spawner.c @@ -1,6 +1,6 @@ /* ISC license. */ -#include +#include #include #include #include @@ -10,9 +10,9 @@ #include #include #include -#include #include -#include +#include +#include #include #include #include @@ -135,7 +135,7 @@ static inline void handle_stdin (stralloc *sa, char const *linevar, char const * while (!pid) { size_t start ; - register ssize_t r ; + ssize_t r ; if (!sa->len && linevar) if (!stralloc_cats(sa, linevar) || !stralloc_catb(sa, "=", 1)) dienomem() ; @@ -149,7 +149,7 @@ static inline void handle_stdin (stralloc *sa, char const *linevar, char const * if (r <= 0) break ; if (sa->len == start + 1) { - start = linevar ? 0 : str_len(sa->s) + 1 ; + start = linevar ? 0 : strlen(sa->s) + 1 ; if (start >= sa->len) { if (verbosity) strerr_warnw1x("read an empty event!") ; @@ -191,7 +191,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, "l:v:t:", &l) ; + int opt = subgetopt_r(argc, argv, "l:v:t:", &l) ; if (opt == -1) break ; switch (opt) { @@ -204,7 +204,7 @@ int main (int argc, char const *const *argv, char const *const *envp) argc -= l.ind ; argv += l.ind ; if (!argc) strerr_dieusage(100, USAGE) ; } - if (linevar && linevar[str_chr(linevar, '=')]) + if (linevar && strchr(linevar, '=')) strerr_dief2x(100, "invalid variable: ", linevar) ; if (ndelay_on(0) < 0) strerr_diefu1sys(111, "set stdin nonblocking") ; @@ -221,7 +221,7 @@ int main (int argc, char const *const *argv, char const *const *envp) while (cont || pid) { - register int r ; + int r ; if (buffer_len(buffer_0)) handle_stdin(&sa, linevar, argv, envp) ; r = iopause_g(x, 1 + (!pid && cont), &deadline) ; -- cgit v1.2.3