From bcb3be07e5cf728442ac7059305b7b2ddb6c1e85 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Sun, 2 Jan 1994 18:36:39 -0800 Subject: [PATCH] initialization not right in two places, lint cleanups SCCS-vsn: usr.bin/man/man.c 8.12 --- usr/src/usr.bin/man/man.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usr/src/usr.bin/man/man.c b/usr/src/usr.bin/man/man.c index 366fb80c42..d7e9555e49 100644 --- a/usr/src/usr.bin/man/man.c +++ b/usr/src/usr.bin/man/man.c @@ -12,7 +12,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)man.c 8.11 (Berkeley) %G%"; +static char sccsid[] = "@(#)man.c 8.12 (Berkeley) %G%"; #endif /* not lint */ #include @@ -60,8 +60,8 @@ main(argc, argv) char **ap, *cmd, *machine, *p, *p_add, *p_path, *pager, *slashp; char *conffile, buf[MAXPATHLEN * 2]; - conffile = NULL; f_cat = f_how = 0; + conffile = p_add = p_path = NULL; while ((ch = getopt(argc, argv, "-aC:cfhkM:m:P:w")) != EOF) switch (ch) { case 'a': @@ -344,8 +344,7 @@ manual(page, tag, pg) buf[0] = '*'; /* For each element in the list... */ - if (tag != NULL) - e_tag = tag->list.tqh_first; + e_tag = tag == NULL ? NULL : tag->list.tqh_first; for (; e_tag != NULL; e_tag = e_tag->q.tqe_next) { (void)snprintf(buf, sizeof(buf), "%s/%s.*", e_tag->s, page); if (glob(buf, -- 2.20.1