From 6e00df7691d8cafb93fabc3b9eecd7e066819990 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 8 Jun 1996 04:30:06 +0000 Subject: Fix exit code when used in non-interactive mode. Remove ';' typo attached to if statement. --- usr.bin/units/units.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usr.bin/units/units.c') diff --git a/usr.bin/units/units.c b/usr.bin/units/units.c index 83e5b42..cb8402f 100644 --- a/usr.bin/units/units.c +++ b/usr.bin/units/units.c @@ -1,4 +1,4 @@ -/* $Id: units.c,v 1.6 1996/04/06 06:01:03 thorpej Exp $ */ +/* $Id: units.c,v 1.1.1.1 1996/06/08 03:43:43 alex Exp $ */ /* * units.c Copyright (c) 1993 by Adrian Mariano (adrian@cam.cornell.edu) @@ -683,8 +683,8 @@ main(int argc, char **argv) if (!quiet) printf("You have: "); if (!fgets(havestr, 80, stdin)) { - if (!quiet); - putchar('\n'); + if (!quiet) + putchar('\n'); exit(0); } } while (addunit(&have, havestr, 0) || @@ -703,4 +703,6 @@ main(int argc, char **argv) showanswer(&have, &want); } } + + return(0); } -- cgit v1.1