diff options
Diffstat (limited to 'apropos_db.c')
-rw-r--r-- | apropos_db.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apropos_db.c b/apropos_db.c index 8aea771d..e51b6ef1 100644 --- a/apropos_db.c +++ b/apropos_db.c @@ -1,4 +1,4 @@ -/* $Id: apropos_db.c,v 1.31 2012/03/24 01:46:25 kristaps Exp $ */ +/* $Id: apropos_db.c,v 1.32 2012/03/25 00:48:47 kristaps Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -19,6 +19,8 @@ #include "config.h" #endif +#include <sys/param.h> + #include <assert.h> #include <fcntl.h> #include <regex.h> @@ -426,6 +428,7 @@ apropos_search(int pathsz, char **paths, const struct opts *opts, */ for (i = 0; i < pathsz; i++) { + assert('/' == paths[i][0]); if (chdir(paths[i])) continue; if (single_search(&tree, opts, expr, terms, mc, i)) |