diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-02-17 22:30:53 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-02-17 22:30:53 +0000 |
commit | fdffefb8032922ce7ffe4c00816072a8ff2148fc (patch) | |
tree | bc7313151a429c45d8bab8ad8b9dd32f4e51335f /src/libunixonacid/ipc_timed_recv.c | |
parent | a896ca2a8c617e5e00ffd5fc9e69331ad754e5b3 (diff) | |
download | skalibs-fdffefb8032922ce7ffe4c00816072a8ff2148fc.tar.xz |
More types changes
New disize
Add size_t to the autotypes list
Delete redundant and replace-libc files
dev_t/ino_t pass
Big size_t pass
More things missing, still not operational yet
Diffstat (limited to 'src/libunixonacid/ipc_timed_recv.c')
-rw-r--r-- | src/libunixonacid/ipc_timed_recv.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libunixonacid/ipc_timed_recv.c b/src/libunixonacid/ipc_timed_recv.c index 7093c4d..acf3d48 100644 --- a/src/libunixonacid/ipc_timed_recv.c +++ b/src/libunixonacid/ipc_timed_recv.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include <sys/types.h> #include <skalibs/functypes.h> #include <skalibs/tai.h> #include <skalibs/webipc.h> @@ -9,7 +10,7 @@ struct blah_s { int fd ; char *s ; - unsigned int len ; + size_t len ; char *path ; } ; @@ -18,13 +19,13 @@ static int getfd (struct blah_s *blah) return blah->fd ; } -static int get (struct blah_s *blah) +static ssize_t get (struct blah_s *blah) { return sanitize_read(ipc_recv(blah->fd, blah->s, blah->len, blah->path)) ; } -int ipc_timed_recv (int fd, char *s, unsigned int len, char *path, tain_t const *deadline, tain_t *stamp) +ssize_t ipc_timed_recv (int fd, char *s, size_t len, char *path, tain_t const *deadline, tain_t *stamp) { struct blah_s blah = { .fd = fd, .s = s, .len = len, .path = path } ; - return timed_get(&blah, (initfunc_t_ref)&getfd, (initfunc_t_ref)&get, deadline, stamp) ; + return timed_get(&blah, (initfunc_t_ref)&getfd, (getfunc_t_ref)&get, deadline, stamp) ; } |