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/ftrigw_notifyb_nosig.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/libs6/ftrigw_notifyb_nosig.c') 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 #include #include #include @@ -9,13 +10,13 @@ #include "ftrig1.h" #include -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 ! -- cgit v1.3.1