summaryrefslogtreecommitdiff
path: root/src/libunixonacid/unixmessage_receiver_free.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-02-17 22:30:53 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-02-17 22:30:53 +0000
commitfdffefb8032922ce7ffe4c00816072a8ff2148fc (patch)
treebc7313151a429c45d8bab8ad8b9dd32f4e51335f /src/libunixonacid/unixmessage_receiver_free.c
parenta896ca2a8c617e5e00ffd5fc9e69331ad754e5b3 (diff)
downloadskalibs-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/unixmessage_receiver_free.c')
-rw-r--r--src/libunixonacid/unixmessage_receiver_free.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libunixonacid/unixmessage_receiver_free.c b/src/libunixonacid/unixmessage_receiver_free.c
index d9d575e..776509c 100644
--- a/src/libunixonacid/unixmessage_receiver_free.c
+++ b/src/libunixonacid/unixmessage_receiver_free.c
@@ -1,5 +1,6 @@
/* ISC license. */
+#include <sys/types.h>
#include <skalibs/cbuffer.h>
#include <skalibs/stralloc.h>
#include <skalibs/djbunix.h>
@@ -7,19 +8,20 @@
void unixmessage_receiver_free (unixmessage_receiver_t *b)
{
- register unsigned int h = b->maindata.len ;
+ size_t maindatalen = b->maindata.len ;
+ int h ;
b->fd = -1 ;
stralloc_free(&b->maindata) ;
- h = h != b->mainlen || b->auxdata.len != b->auxlen || cbuffer_len(&b->auxb) ;
+ h = maindatalen != b->mainlen || b->auxdata.len != b->auxlen || cbuffer_len(&b->auxb) ;
if (h)
{
- register unsigned int n = b->auxdata.len / sizeof(int) ;
+ size_t n = b->auxdata.len / sizeof(int) ;
while (n--) fd_close(((int *)b->auxdata.s)[n]) ;
}
stralloc_free(&b->auxdata) ;
if (h)
{
- register unsigned int n = cbuffer_len(&b->auxb) / sizeof(int) ;
+ size_t n = cbuffer_len(&b->auxb) / sizeof(int) ;
if (n)
{
int fds[n] ;