mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
Fix wrong assert in evbuffer_drain()
"chain" cannot be NULL here because we have at least one chain (we
handle empty buffer separatelly) and hence loop will be executed at
least once.
Link: 841ecbd961 (commitcomment-23631347)
Signed-off-by: Ivan Maidanski <i.maidanski@samsung.com>
Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
(cherry picked from commit b26996a05d9e7aad32e78a7bfab6454d5c11500a)
This commit is contained in:
parent
980394b98b
commit
9f4d0dceef
2
buffer.c
2
buffer.c
@ -1146,7 +1146,7 @@ evbuffer_drain(struct evbuffer *buf, size_t len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
buf->first = chain;
|
buf->first = chain;
|
||||||
EVUTIL_ASSERT(chain && remaining <= chain->off);
|
EVUTIL_ASSERT(remaining < chain->off);
|
||||||
chain->misalign += remaining;
|
chain->misalign += remaining;
|
||||||
chain->off -= remaining;
|
chain->off -= remaining;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user