cleanup TAILQ use

This commit is contained in:
lukem 2002-06-11 07:17:15 +00:00
parent f51456c273
commit 60ca6c1a6a
2 changed files with 8 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: apropos.c,v 1.18 2002/06/11 05:46:50 itojun Exp $ */
/* $NetBSD: apropos.c,v 1.19 2002/06/11 07:17:15 lukem Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@ -44,7 +44,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)apropos.c 8.8 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: apropos.c,v 1.18 2002/06/11 05:46:50 itojun Exp $");
__RCSID("$NetBSD: apropos.c,v 1.19 2002/06/11 07:17:15 lukem Exp $");
#endif
#endif /* not lint */
@ -121,9 +121,8 @@ main(argc, argv)
apropos(argv, p_path, 1);
else {
config(conffile);
ep = (tp = getlist("_whatdb", 0)) == NULL ?
NULL : TAILQ_FIRST(&tp->list);
for (; ep != NULL; ep = TAILQ_NEXT(ep, q)) {
tp = getlist("_whatdb", 1);
TAILQ_FOREACH(ep, &tp->list, q) {
if ((rv = glob(ep->s, GLOB_BRACE | GLOB_NOSORT, NULL,
&pg)) != 0) {
if (rv == GLOB_NOMATCH)

View File

@ -1,4 +1,4 @@
/* $NetBSD: whatis.c,v 1.14 2002/06/11 05:55:24 itojun Exp $ */
/* $NetBSD: whatis.c,v 1.15 2002/06/11 07:19:01 lukem Exp $ */
/*
* Copyright (c) 1987, 1993
@ -44,7 +44,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993\n\
#if 0
static char sccsid[] = "@(#)whatis.c 8.5 (Berkeley) 1/2/94";
#else
__RCSID("$NetBSD: whatis.c,v 1.14 2002/06/11 05:55:24 itojun Exp $");
__RCSID("$NetBSD: whatis.c,v 1.15 2002/06/11 07:19:01 lukem Exp $");
#endif
#endif /* not lint */
@ -121,9 +121,8 @@ main(argc, argv)
whatis(argv, p_path, 1);
else {
config(conffile);
ep = (tp = getlist("_whatdb", 0)) == NULL ?
NULL : TAILQ_FIRST(&tp->list);
for (; ep != NULL; ep = TAILQ_NEXT(ep, q)) {
tp = getlist("_whatdb", 0);
TAILQ_FOREACH(ep, &tp->list, q) {
if ((rv = glob(ep->s, GLOB_BRACE | GLOB_NOSORT, NULL,
&pg)) != 0) {
if (rv == GLOB_NOMATCH)