Date: 25 May 1998 14:03:24 +0200 From: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) To: Steve Price <steve@FreeBSD.ORG> Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-usrbin@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/who who.c Message-ID: <xzpn2c6blrn.fsf@ringhorni.ifi.uio.no> In-Reply-To: Steve Price's message of "Mon, 25 May 1998 00:19:08 -0700 (PDT)" References: <199805250719.AAA00290@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Steve Price <steve@FreeBSD.ORG> writes:
> Modified files:
> usr.bin/who who.c
> Log:
> Only allow 'who' and 'who am i' as valid usages.
Umm, didn't I fix this an eternity ago?
revision 1.6
date: 1998/04/26 19:10:51; author: des; state: Exp; lines: +5 -1
Check that user really typed "who am {I,i}", and that no stray
arguments are given.
Note that usage() and the manpage disagree...
PR: bin/6294
Suggested by: Ruslan Ermilov and Bruce Evans
Submitted by: Ruslan Ermilov (partly)
Your diff does nothing:
Index: who.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/who/who.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -r1.6 -r1.7
48c48
< "$Id: who.c,v 1.6 1998/04/26 19:10:51 des Exp $";
---
> "$Id: who.c,v 1.7 1998/05/25 07:19:07 steve Exp $";
56a57
> #include <stdlib.h>
74a76,78
>
> if (getopt(argc, argv, "") != -1)
> usage();
the getopt() check is unnecessary because the if (strcmp(...)) further
down will catch it. The #include is unnecessary because it is only
needed for getopt().
--
Noone else has a .sig like this one.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpn2c6blrn.fsf>
