From fdffefb8032922ce7ffe4c00816072a8ff2148fc Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 17 Feb 2017 22:30:53 +0000 Subject: 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 --- src/libstddjb/openreadfileclose.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libstddjb/openreadfileclose.c') diff --git a/src/libstddjb/openreadfileclose.c b/src/libstddjb/openreadfileclose.c index 90e6b47..b78232c 100644 --- a/src/libstddjb/openreadfileclose.c +++ b/src/libstddjb/openreadfileclose.c @@ -7,9 +7,9 @@ #include #include -int openreadfileclose (char const *file, stralloc *sa, unsigned int limit) +int openreadfileclose (char const *file, stralloc *sa, size_t limit) { - unsigned int n ; + size_t n ; int fd = open_readb(file) ; if (fd < 0) return 0 ; { @@ -20,7 +20,7 @@ int openreadfileclose (char const *file, stralloc *sa, unsigned int limit) if (limit && (limit < n)) n = limit ; if (!stralloc_ready_tuned(sa, sa->len + n, 0, 0, 1)) goto err ; { - register unsigned int r = allread(fd, sa->s + sa->len, n) ; + size_t r = allread(fd, sa->s + sa->len, n) ; sa->len += r ; if (r < n) goto err ; } @@ -29,7 +29,7 @@ int openreadfileclose (char const *file, stralloc *sa, unsigned int limit) err: { - register int e = errno ; + int e = errno ; fd_close(fd) ; errno = e ; } -- cgit v1.2.3