On Sun, 7 Dec 1997, Igor Tatarinov wrote:
> In buff.c :: writev_it_all() we have
>
> /* recalculate vec to deal with partial writes */
> while (rv > 0) {
> if (rv < vec[i].iov_len) {
> vec[i].iov_base = (char *) vec[i].iov_base + rv;
> vec[i].iov_len -= rv;
> rv = 0;
> * if (vec[i].iov_len == 0) {
> * ++i;
> * }
> }
> else {
> rv -= vec[i].iov_len;
> ++i;
> }
> }
>
> Apparently, the marked lines are never executed since
> the first if's condition is: rv < vec[i].iov_len.
> Dont' know if it's worth changing though :)
Sure, why not... dead code is lame. Here it is as a patch, +1.
Dean
Index: buff.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/buff.c,v
retrieving revision 1.51
diff -u -r1.51 buff.c
--- buff.c 1997/11/13 20:37:57 1.51
+++ buff.c 1997/12/21 00:00:22
@@ -898,9 +898,6 @@
vec[i].iov_base = (char *) vec[i].iov_base + rv;
vec[i].iov_len -= rv;
rv = 0;
- if (vec[i].iov_len == 0) {
- ++i;
- }
}
else {
rv -= vec[i].iov_len;
|