# include	"llist.h"

List_p
ll_unhook(lp)
register List_p	lp;
{
	LIST_INCR(ll_unhook);
	LL_MAGIC(lp);

	if (lp->ll_prev)
		lp->ll_prev->ll_next = lp->ll_next;
	if (lp->ll_next)
		lp->ll_next->ll_prev = lp->ll_prev;

	lp->ll_prev = lp->ll_next = NULL;

	return lp;
}
