Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Instead of assert if sbuf is unfinished, just finish it
Baptiste Daroussin committed 14 years ago
commit c4b33f9c2134433c079d0b37caf19a8051617830
parent 24fac72
1 file changed +3 -2
modified libpkg/pkg_util.c
@@ -33,9 +33,10 @@ sbuf_get(struct sbuf *buf)
{

	assert(buf != NULL);
-
	assert((buf->s_flags & SBUF_FINISHED) == SBUF_FINISHED);
+
	if (sbuf_done(buf) == 0)
+
		sbuf_finish(buf);

-
	return (buf->s_buf);
+
	return (sbuf_data(buf));
}

void