X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/528bfcd79a0ebcf9a2a0071981525213f25b1fc6..cad2bba7d809c9f385fd8b85959c09c5e687edb5:/io.c diff --git a/io.c b/io.c index e9a66a48..85ff7424 100644 --- a/io.c +++ b/io.c @@ -145,7 +145,7 @@ static void read_loop(int fd, char *buf, int len) } } -/* read from the file descriptor handing multiplexing - +/* read from the file descriptor handling multiplexing - return number of bytes read never return <= 0 */ static int read_unbuffered(int fd, char *buf, int len) @@ -223,10 +223,7 @@ static void read_check(int f) if (n > (read_buffer_size - read_buffer_len)) { read_buffer_size += n; - if (!read_buffer) - read_buffer = (char *)malloc(read_buffer_size); - else - read_buffer = (char *)realloc(read_buffer,read_buffer_size); + read_buffer = (char *)Realloc(read_buffer,read_buffer_size); if (!read_buffer) out_of_memory("read check"); read_buffer_p = read_buffer; }