[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] Re: Dead or wrong code
On Jun 7, 2011, at 8:48 PM, Gilad Benjamini wrote:
955 buf->first = chain;
956 if (chain) {
957 chain->misalign += remaining;
958 chain->off -= remaining;
959 }
Draining all the buffer trigger this code.
Adding an assert in line 957 cause the tests to die, so this code is
certainly not dead yet ;-)
Perhaps I wasn't clear.
No, its my fault :-)
I was referring to line 956. If the code was able to reach line 956,
the value of chain cannot be NULL and therefore there is no need for
the test.
A NULL value for chain would have broken the code earlier.
Indeed, chain is always non-null in line 956.
This check was added in 03afa209 - I don't see why but maybe the
author can explain why.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.