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/libstddjb/openreadfileclose.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/libstddjb/openreadfileclose.c')
-rw-r--r-- | src/libstddjb/openreadfileclose.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 <skalibs/stralloc.h> #include <skalibs/djbunix.h> -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 ; } |