From: Joel Rosdahl Date: Sat, 30 Jul 2016 13:26:59 +0000 (+0200) Subject: Clean up after f731bd4a X-Git-Tag: v3.3~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d68445735d40cb887132ab4dbe57ce54f233891c;p=thirdparty%2Fccache.git Clean up after f731bd4a --- diff --git a/ccache.h b/ccache.h index 9194f2339..d01eae088 100644 --- a/ccache.h +++ b/ccache.h @@ -75,8 +75,8 @@ enum stats { (strlen(s) >= strlen(suffix) \ && str_eq((s) + strlen(s) - strlen(suffix), (suffix))) -/* buffer size for IO operations */ -#define READ_BUF_SZ (1<<18) +// Buffer size for I/O operations. +#define READ_BUFFER_SIZE (1 << 18) // ---------------------------------------------------------------------------- // args.c diff --git a/hash.c b/hash.c index 398a5d406..3b462ca9e 100644 --- a/hash.c +++ b/hash.c @@ -97,7 +97,7 @@ hash_int(struct mdfour *md, int x) bool hash_fd(struct mdfour *md, int fd) { - char buf[READ_BUF_SZ]; + char buf[READ_BUFFER_SIZE]; ssize_t n; while ((n = read(fd, buf, sizeof(buf))) != 0) { diff --git a/util.c b/util.c index acc43ab9d..ef5a78edd 100644 --- a/util.c +++ b/util.c @@ -197,7 +197,7 @@ copy_fd(int fd_in, int fd_out) } int n; - char buf[READ_BUF_SZ]; + char buf[READ_BUFFER_SIZE]; while ((n = gzread(gz_in, buf, sizeof(buf))) > 0) { ssize_t written = 0; do { @@ -297,7 +297,7 @@ copy_file(const char *src, const char *dest, int compress_level) } int n; - char buf[READ_BUF_SZ]; + char buf[READ_BUFFER_SIZE]; while ((n = gzread(gz_in, buf, sizeof(buf))) > 0) { int written; if (compress_level > 0) {