Subject: small bug in tsort
To: None <netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: Frank van der Linden <vdlinden@fwi.uva.nl>
List: netbsd-bugs
Date: 12/01/1993 19:29:42
 Hi,

 There's still a minor bug in tsort.

# This should work according to the manual page, but it doesn't
% tsort out
usage: tsort [ inputfile ]
# This should give the usage message, but it doesn't
% tsort lots of crap
tsort: No such file or directory

Possible fix: see diff below

Onno van der Linden  c/o  vdlinden@fwi.uva.nl (Frank van der Linden)

*** tsort.c.old	Wed Dec  1 19:14:25 1993
--- tsort.c	Wed Dec  1 19:14:52 1993
***************
*** 114,118 ****
  	if (argc < 2)
  		fp = stdin;
! 	else if (argc == 2) {
  		(void)fprintf(stderr, "usage: tsort [ inputfile ]\n");
  		exit(1);
--- 114,118 ----
  	if (argc < 2)
  		fp = stdin;
! 	else if (argc > 2) {
  		(void)fprintf(stderr, "usage: tsort [ inputfile ]\n");
  		exit(1);

------------------------------------------------------------------------------