From f175b29e06aee5787c55ef79b2cfd76f3d7a4c1f Mon Sep 17 00:00:00 2001 From: des Date: Sun, 28 Jan 2001 00:33:58 +0000 Subject: [PATCH] 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(). --- sys/kern/subr_sbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c index c59cea72ddb8..247ecac033bb 100644 --- a/sys/kern/subr_sbuf.c +++ b/sys/kern/subr_sbuf.c @@ -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);