From 6305fe2580781df44e93c1ec8ed380896680960d Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 21 Jul 2018 16:42:59 +0000 Subject: Adapt to skalibs-2.7.0.0 --- src/daemontools-extras/s6-log.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/daemontools-extras/s6-log.c') diff --git a/src/daemontools-extras/s6-log.c b/src/daemontools-extras/s6-log.c index 10d78f3..04cfe8c 100644 --- a/src/daemontools-extras/s6-log.c +++ b/src/daemontools-extras/s6-log.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -215,9 +216,7 @@ static inline int logdir_trim (logdir_t *ldp) } if (errno) { - int e = errno ; dir_close(dir) ; - errno = e ; return -1 ; } rewinddir(dir) ; @@ -252,9 +251,7 @@ static inline int logdir_trim (logdir_t *ldp) } if (errno) { - int e = errno ; dir_close(dir) ; - errno = e ; return -1 ; } dir_close(dir) ; @@ -586,9 +583,9 @@ static inline void logdir_init (unsigned int index, uint32_t s, uint32_t n, uint } else if (st.st_mode & S_IXUSR) goto opencurrent ; memcpy(x + dirlen + 1, "state", 6) ; - unlink(x) ; + unlink_void(x) ; memcpy(x + dirlen + 1, "newstate", 9) ; - unlink(x) ; + unlink_void(x) ; { int flagprocessed = 0 ; memcpy(x + dirlen + 1, "processed", 10) ; @@ -600,13 +597,13 @@ static inline void logdir_init (unsigned int index, uint32_t s, uint32_t n, uint if (flagprocessed) { memcpy(x + dirlen + 1, "previous", 9) ; - unlink(x) ; + unlink_void(x) ; if (finish(ldp, "processed", 's') < 0) strerr_diefu2sys(111, "finish processed .s for logdir ", ldp->dir) ; } else { - unlink(x) ; + unlink_void(x) ; if (finish(ldp, "previous", 'u') < 0) strerr_diefu2sys(111, "finish previous .u for logdir ", ldp->dir) ; } -- cgit v1.2.3