summaryrefslogtreecommitdiff
path: root/src/libs6/ftrigw_notifyb_nosig.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/ftrigw_notifyb_nosig.c
parent81c7a02ec870ef3dba9f8b8f8dbecbd119e5ea47 (diff)
downloads6-bf6d072124a960d3b84ae39cd15c5aeca2e41c88.tar.xz
Types fix, first pass
Diffstat (limited to 'src/libs6/ftrigw_notifyb_nosig.c')
-rw-r--r--src/libs6/ftrigw_notifyb_nosig.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libs6/ftrigw_notifyb_nosig.c b/src/libs6/ftrigw_notifyb_nosig.c
index 0d7b565..0a21419 100644
--- a/src/libs6/ftrigw_notifyb_nosig.c
+++ b/src/libs6/ftrigw_notifyb_nosig.c
@@ -1,5 +1,6 @@
/* ISC license. */
+#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <skalibs/direntry.h>
@@ -9,13 +10,13 @@
#include "ftrig1.h"
#include <s6/ftrigw.h>
-int ftrigw_notifyb_nosig (char const *path, char const *s, unsigned int len)
+int ftrigw_notifyb_nosig (char const *path, char const *s, size_t len)
{
unsigned int i = 0 ;
DIR *dir = opendir(path) ;
if (!dir) return -1 ;
{
- unsigned int pathlen = str_len(path) ;
+ size_t pathlen = str_len(path) ;
char tmp[pathlen + FTRIG1_PREFIXLEN + 45] ;
byte_copy(tmp, pathlen, path) ;
tmp[pathlen] = '/' ; tmp[pathlen + FTRIG1_PREFIXLEN + 44] = 0 ;
@@ -36,8 +37,8 @@ int ftrigw_notifyb_nosig (char const *path, char const *s, unsigned int len)
}
else
{
- register int r = fd_write(fd, s, len) ;
- if ((r < 0) || (unsigned int)r < len)
+ register ssize_t r = fd_write(fd, s, len) ;
+ if ((r < 0) || (size_t)r < len)
{
if (errno == EPIPE) unlink(tmp) ;
/* what to do if EGAIN ? full fifo -> fix the reader !