diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-09 11:18:57 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-09 11:18:57 +0000 |
commit | a3e170c941a86d4feb7c5e356800af0f99513bb5 (patch) | |
tree | 15fd19e944202da9f7c203b465462693c765a075 /apropos_db.c | |
parent | c178420d8409d86df7e3ecc4765bba71f119cbc7 (diff) | |
download | mandoc-a3e170c941a86d4feb7c5e356800af0f99513bb5.tar.gz |
When specifying an architecture to whatis(1)/apropos(1)/man.cgi(7), do a
comparison only if the manual specifies an architecture, otherwise let it
through. Looked over by schwarze@. This brings us much more in line with
OpenBSD's behaviour.
Diffstat (limited to 'apropos_db.c')
-rw-r--r-- | apropos_db.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apropos_db.c b/apropos_db.c index 6859a914..36afaf47 100644 --- a/apropos_db.c +++ b/apropos_db.c @@ -541,8 +541,10 @@ single_search(struct rectree *tree, const struct opts *opts, if (opts->cat && strcasecmp(opts->cat, r.res.cat)) continue; - if (opts->arch && strcasecmp(opts->arch, r.res.arch)) - continue; + + if (opts->arch && *r.res.arch) + if (strcasecmp(opts->arch, r.res.arch)) + continue; tree->node = rs = mandoc_realloc (rs, (tree->len + 1) * sizeof(struct rec)); |