diff options
author | Alexander Langer <alex@FreeBSD.org> | 1996-06-08 04:30:06 +0000 |
---|---|---|
committer | Alexander Langer <alex@FreeBSD.org> | 1996-06-08 04:30:06 +0000 |
commit | 4c0c227d97278b5669c7b3d5712e2fc61b2a3479 (patch) | |
tree | e816499410ac55b7ffac47d42eda5794d265d0ae /usr.bin/units | |
parent | bc720a306101e45092831991be5b596413934b3c (diff) | |
download | src-4c0c227d97278b5669c7b3d5712e2fc61b2a3479.tar.gz src-4c0c227d97278b5669c7b3d5712e2fc61b2a3479.zip |
Fix exit code when used in non-interactive mode.
Remove ';' typo attached to if statement.
Notes
Notes:
svn path=/head/; revision=16190
Diffstat (limited to 'usr.bin/units')
-rw-r--r-- | usr.bin/units/units.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/units/units.c b/usr.bin/units/units.c index 83e5b4223b22..cb8402f7174a 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); } |