Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/finger PR/28264: Miles Nordin: finger does not consu...



details:   https://anonhg.NetBSD.org/src/rev/d9b3aa0451fc
branches:  trunk
changeset: 571172:d9b3aa0451fc
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Nov 12 21:48:58 2004 +0000

description:
PR/28264: Miles Nordin: finger does not consult utmp if a username is specified

diffstat:

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

diffs (35 lines):

diff -r 2909721f793b -r d9b3aa0451fc usr.bin/finger/util.c
--- a/usr.bin/finger/util.c     Fri Nov 12 19:34:43 2004 +0000
+++ b/usr.bin/finger/util.c     Fri Nov 12 21:48:58 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.22 2004/10/30 17:21:15 dsl Exp $    */
+/*     $NetBSD: util.c,v 1.23 2004/11/12 21:48:58 christos Exp $       */
 
 /*
  * Copyright (c) 1989, 1993
@@ -72,7 +72,7 @@
 #if 0
 static char sccsid[] = "@(#)util.c     8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: util.c,v 1.22 2004/10/30 17:21:15 dsl Exp $");
+__RCSID("$NetBSD: util.c,v 1.23 2004/11/12 21:48:58 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -268,7 +268,6 @@
 find_person(name)
        char *name;
 {
-       int cnt;
        DBT data, key;
        PERSON *p;
 
@@ -276,7 +275,7 @@
                return(NULL);
 
        key.data = name;
-       key.size = cnt;
+       key.size = strlen(name);
 
        if ((*db->get)(db, &key, &data, 0))
                return (NULL);



Home | Main Index | Thread Index | Old Index