summaryrefslogtreecommitdiff
path: root/src/libs6/ftrigr_subscribe.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-01-12 23:16:36 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-01-12 23:16:36 +0000
commitbf6d072124a960d3b84ae39cd15c5aeca2e41c88 (patch)
treec082150f61e67d929b1baca2f5c6104fe959ccac /src/libs6/ftrigr_subscribe.c
parent81c7a02ec870ef3dba9f8b8f8dbecbd119e5ea47 (diff)
downloads6-bf6d072124a960d3b84ae39cd15c5aeca2e41c88.tar.xz
Types fix, first pass
Diffstat (limited to 'src/libs6/ftrigr_subscribe.c')
-rw-r--r--src/libs6/ftrigr_subscribe.c14
1 files changed, 8 insertions, 6 deletions
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 <sys/types.h>
+#include <stdint.h>
#include <errno.h>
#include <skalibs/uint16.h>
#include <skalibs/uint32.h>
@@ -9,19 +11,19 @@
#include <skalibs/skaclient.h>
#include <s6/ftrigr.h>
-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 ;