The following commit has been merged in the master branch: commit 751c399e50a087fb5c6367cbfd5a551e3ac676c9 Author: Guillem Jover <guil...@debian.org> Date: Mon May 9 19:59:21 2011 +0200
libdpkg: Remove unneeded checks on buffer_copy loop termination The while loop checks unnecessarily for bytesread and byteswritten being >= 0, but that's always going to be true, as in case of read or write error the code breaks out of the loop. diff --git a/lib/dpkg/buffer.c b/lib/dpkg/buffer.c index 950e1a6..3654f4f 100644 --- a/lib/dpkg/buffer.c +++ b/lib/dpkg/buffer.c @@ -166,7 +166,7 @@ buffer_copy(struct buffer_data *read_data, struct buffer_data *write_data, buffer_init(write_data); - while (bytesread >= 0 && byteswritten >= 0 && bufsize > 0) { + while (bufsize > 0) { bytesread = buffer_read(read_data, buf, bufsize); if (bytesread < 0) break; -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org