From bf6d072124a960d3b84ae39cd15c5aeca2e41c88 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 12 Jan 2017 23:16:36 +0000 Subject: Types fix, first pass --- src/libs6/ftrigr_subscribe.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/libs6/ftrigr_subscribe.c') diff --git a/src/libs6/ftrigr_subscribe.c b/src/libs6/ftrigr_subscribe.c index 95a5d0b..ddb706f 100644 --- a/src/libs6/ftrigr_subscribe.c +++ b/src/libs6/ftrigr_subscribe.c @@ -1,5 +1,7 @@ /* ISC license. */ +#include +#include #include #include #include @@ -9,19 +11,19 @@ #include #include -uint16 ftrigr_subscribe (ftrigr_t *a, char const *path, char const *re, uint32 options, tain_t const *deadline, tain_t *stamp) +uint16_t ftrigr_subscribe (ftrigr_t *a, char const *path, char const *re, uint32_t options, tain_t const *deadline, tain_t *stamp) { - unsigned int pathlen = str_len(path) ; - unsigned int relen = str_len(re) ; + size_t pathlen = str_len(path) ; + size_t relen = str_len(re) ; unsigned int i ; char err ; char tmp[15] = "--L" ; siovec_t v[3] = { { .s = tmp, .len = 15 }, { .s = (char *)path, .len = pathlen + 1 }, { .s = (char *)re, .len = relen + 1 } } ; if (!gensetdyn_new(&a->data, &i)) return 0 ; - uint16_pack_big(tmp, (uint16)i) ; + uint16_pack_big(tmp, (uint16_t)i) ; uint32_pack_big(tmp+3, options) ; - uint32_pack_big(tmp+7, (uint32)pathlen) ; - uint32_pack_big(tmp+11, (uint32)relen) ; + uint32_pack_big(tmp+7, (uint32_t)pathlen) ; + uint32_pack_big(tmp+11, (uint32_t)relen) ; if (!skaclient_sendv(&a->connection, v, 3, &skaclient_default_cb, &err, deadline, stamp)) { register int e = errno ; -- cgit v1.2.3