summary refs log tree commit diff
path: root/search.c
diff options
context:
space:
mode:
authorokan <okan>2015-06-28 19:50:46 +0000
committerokan <okan>2015-06-28 19:50:46 +0000
commit17720de4abd818ec04447f255e3d670ed2929911 (patch)
tree869aea4c66d55dd1480922d340a77b7c48b5f932 /search.c
parent18f63629fdb322e2bd9d39972bf28c3bc96d0942 (diff)
downloadcwm-17720de4abd818ec04447f255e3d670ed2929911.tar.gz
cwm-17720de4abd818ec04447f255e3d670ed2929911.tar.xz
cwm-17720de4abd818ec04447f255e3d670ed2929911.zip
replace assert usage
Diffstat (limited to 'search.c')
-rw-r--r--search.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/search.c b/search.c
index 770159b..9ddfd79 100644
--- a/search.c
+++ b/search.c
@@ -21,7 +21,6 @@
 #include <sys/types.h>
 #include <sys/queue.h>
 
-#include <assert.h>
 #include <err.h>
 #include <errno.h>
 #include <fnmatch.h>
@@ -106,7 +105,8 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
 		if ((cc->flags & CLIENT_HIDDEN) && (tier > 0))
 			tier--;
 
-		assert(tier < nitems(tierp));
+		if (tier >= nitems(tierp))
+			errx(1, "search_match_client: invalid tier");
 
 		/*
 		 * If you have a tierp, insert after it, and make it