aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
authorokan2015-06-28 19:50:46 +0000
committerokan2015-06-28 19:50:46 +0000
commit8d83067e01a0b43472f48c16ce94d2ecfe015af4 (patch)
tree218e7e5bdb91a43427a67c689a5093db4225135d /search.c
parent603997932d26636c5a55d4efd9cf980f86b78088 (diff)
downloadcwm-8d83067e01a0b43472f48c16ce94d2ecfe015af4.tar.gz
replace assert usage
Diffstat (limited to 'search.c')
-rw-r--r--search.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/search.c b/search.c
index 44f233e..deff8e3 100644
--- a/search.c
+++ b/search.c
@@ -15,13 +15,12 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: search.c,v 1.43 2015/06/08 15:34:03 okan Exp $
+ * $OpenBSD: search.c,v 1.44 2015/06/28 19:50:46 okan Exp $
*/
#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