From 8d83067e01a0b43472f48c16ce94d2ecfe015af4 Mon Sep 17 00:00:00 2001 From: okan Date: Sun, 28 Jun 2015 19:50:46 +0000 Subject: replace assert usage --- group.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'group.c') diff --git a/group.c b/group.c index d18ece8..d2c0bf8 100644 --- a/group.c +++ b/group.c @@ -16,13 +16,12 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: group.c,v 1.111 2015/03/28 23:12:47 okan Exp $ + * $OpenBSD: group.c,v 1.112 2015/06/28 19:50:46 okan Exp $ */ #include #include -#include #include #include #include @@ -264,9 +263,9 @@ group_cycle(struct screen_ctx *sc, int flags) { struct group_ctx *gc, *showgroup = NULL; - assert(sc->group_active != NULL); + if (((gc = sc->group_active)) == NULL) + errx(1, "group_cycle: no active group"); - gc = sc->group_active; for (;;) { gc = (flags & CWM_RCYCLE) ? TAILQ_PREV(gc, group_ctx_q, entry) : TAILQ_NEXT(gc, entry); -- cgit v1.2.3-2-gb3c3