Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/man get the value of the entry for the class not the...



details:   https://anonhg.NetBSD.org/src/rev/99572585b8c1
branches:  trunk
changeset: 756165:99572585b8c1
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jul 07 21:24:34 2010 +0000

description:
get the value of the entry for the class not the key.

diffstat:

 usr.bin/man/man.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 6b97aefdea9e -r 99572585b8c1 usr.bin/man/man.c
--- a/usr.bin/man/man.c Wed Jul 07 21:10:39 2010 +0000
+++ b/usr.bin/man/man.c Wed Jul 07 21:24:34 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: man.c,v 1.40 2010/05/23 22:04:36 christos Exp $        */
+/*     $NetBSD: man.c,v 1.41 2010/07/07 21:24:34 christos Exp $        */
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)man.c      8.17 (Berkeley) 1/31/95";
 #else
-__RCSID("$NetBSD: man.c,v 1.40 2010/05/23 22:04:36 christos Exp $");
+__RCSID("$NetBSD: man.c,v 1.41 2010/07/07 21:24:34 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -956,7 +956,8 @@
        TAG *t;
        snprintf(buf, sizeof(buf), "_%s", machine);
        t = gettag(buf, 0);
-       return t != NULL && t->s ? t->s : NULL;
+       return t != NULL && !TAILQ_EMPTY(&t->entrylist) ?
+           TAILQ_FIRST(&t->entrylist)->s : NULL;
 }
 
 static void



Home | Main Index | Thread Index | Old Index