Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Turn NULL check into assertion.
Yuri Pankov committed 14 years ago
commit bf7591fb44dd66517e4797bdbcaf67a587ea222f
parent c458488
1 file changed +1 -2
modified libpkg/pkg_util.c
@@ -31,9 +31,8 @@ sbuf_set(struct sbuf **buf, const char *str)
char *
sbuf_get(struct sbuf *buf)
{
-
	if (buf == NULL)
-
		return (NULL);

+
	assert(buf != NULL);
	assert((buf->s_flags & SBUF_FINISHED) == SBUF_FINISHED);

	return (buf->s_buf);