From 4a58b169c3f037ddcb77d970b7bf09129dffaf0b Mon Sep 17 00:00:00 2001 From: wulf Date: Tue, 16 Dec 2003 15:40:29 +0000 Subject: [PATCH] Fixed a bug that made lastlogin ignore the first user argument --- usr.sbin/lastlogin/lastlogin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/lastlogin/lastlogin.c b/usr.sbin/lastlogin/lastlogin.c index 98deaa1a8396..ed6fcc053611 100644 --- a/usr.sbin/lastlogin/lastlogin.c +++ b/usr.sbin/lastlogin/lastlogin.c @@ -1,4 +1,4 @@ -/* $NetBSD: lastlogin.c,v 1.7 2003/08/28 15:54:41 elric Exp $ */ +/* $NetBSD: lastlogin.c,v 1.8 2003/12/16 15:40:29 wulf Exp $ */ /* * Copyright (c) 1996 John M. Vinopal * All rights reserved. @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: lastlogin.c,v 1.7 2003/08/28 15:54:41 elric Exp $"); +__RCSID("$NetBSD: lastlogin.c,v 1.8 2003/12/16 15:40:29 wulf Exp $"); #endif #include @@ -104,9 +104,9 @@ main(argc, argv) setpassent(1); /* Keep passwd file pointers open */ /* Process usernames given on the command line. */ - if (argc > 1) { + if (argc > 0) { long offset; - for (i = 1; i < argc; ++i) { + for (i = 0; i < argc; i++) { if ((passwd = getpwnam(argv[i])) == NULL) { warnx("user '%s' not found", argv[i]); continue;