diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-12 23:16:36 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-12 23:16:36 +0000 |
commit | bf6d072124a960d3b84ae39cd15c5aeca2e41c88 (patch) | |
tree | c082150f61e67d929b1baca2f5c6104fe959ccac /src/libs6/s6-ftrigrd.c | |
parent | 81c7a02ec870ef3dba9f8b8f8dbecbd119e5ea47 (diff) | |
download | s6-bf6d072124a960d3b84ae39cd15c5aeca2e41c88.tar.gz s6-bf6d072124a960d3b84ae39cd15c5aeca2e41c88.tar.xz s6-bf6d072124a960d3b84ae39cd15c5aeca2e41c88.zip |
Types fix, first pass
Diffstat (limited to 'src/libs6/s6-ftrigrd.c')
-rw-r--r-- | src/libs6/s6-ftrigrd.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libs6/s6-ftrigrd.c b/src/libs6/s6-ftrigrd.c index ac79bd2..1bbe856 100644 --- a/src/libs6/s6-ftrigrd.c +++ b/src/libs6/s6-ftrigrd.c @@ -1,5 +1,7 @@ /* ISC license. */ +#include <sys/types.h> +#include <stdint.h> #include <errno.h> #include <signal.h> #include <regex.h> @@ -34,8 +36,8 @@ struct ftrigio_s char buf[FTRIGRD_BUFSIZE] ; regex_t re ; stralloc sa ; - uint32 options ; - uint16 id ; /* given by client */ + uint32_t options ; + uint16_t id ; /* given by client */ } ; #define FTRIGIO_ZERO { .xindex = 0, .trig = FTRIG1_ZERO, .b = BUFFER_INIT(0, -1, 0, 0), .buf = "", .sa = STRALLOC_ZERO, .options = 0, .id = 0 } @@ -56,7 +58,7 @@ static void cleanup (void) n = 0 ; } -static void trig (uint16 id, char what, char info) +static void trig (uint16_t id, char what, char info) { char pack[4] ; unixmessage_t m = { .s = pack, .len = 4, .fds = 0, .nfds = 0 } ; @@ -92,8 +94,8 @@ static inline int ftrigio_read (ftrigio_t *p) while (i--) { regmatch_t pmatch ; - unsigned int blen ; - register int r = sanitize_read(buffer_fill(&p->b)) ; + size_t blen ; + register ssize_t r = sanitize_read(buffer_fill(&p->b)) ; if (!r) break ; if (r < 0) return (trig(p->id, 'd', errno), 0) ; blen = buffer_len(&p->b) ; @@ -114,7 +116,7 @@ static inline int ftrigio_read (ftrigio_t *p) static int parse_protocol (unixmessage_t const *m, void *context) { - uint16 id ; + uint16_t id ; if (m->len < 3 || m->nfds) { cleanup() ; @@ -137,7 +139,7 @@ static int parse_protocol (unixmessage_t const *m, void *context) } case 'L' : /* subscribe to path and match re */ { - uint32 options, pathlen, relen ; + uint32_t options, pathlen, relen ; int r ; if (m->len < 19) { |