mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
Remove an assertion I forgot to remove in the previous commit: sbuf_len()
may now be called with an unfinished sbuf. For consistency, copy the related comment from sbuf_delete() to sbuf_clear() and sbuf_len().
This commit is contained in:
parent
ea48868bf6
commit
9fa2ef3da2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71724
@ -114,6 +114,7 @@ void
|
||||
sbuf_clear(struct sbuf *s)
|
||||
{
|
||||
assert_sbuf_integrity(s);
|
||||
/* don't care if it's finished or not */
|
||||
|
||||
SBUF_CLEARFLAG(s, SBUF_FINISHED);
|
||||
SBUF_CLEARFLAG(s, SBUF_OVERFLOWED);
|
||||
@ -285,7 +286,7 @@ int
|
||||
sbuf_len(struct sbuf *s)
|
||||
{
|
||||
assert_sbuf_integrity(s);
|
||||
assert_sbuf_state(s, SBUF_FINISHED);
|
||||
/* don't care if it's finished or not */
|
||||
|
||||
if (SBUF_HASOVERFLOWED(s))
|
||||
return (-1);
|
||||
|
Loading…
Reference in New Issue
Block a user