summaryrefslogtreecommitdiffstats
path: root/usr.bin/units
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>1996-06-08 04:30:06 +0000
committeralex <alex@FreeBSD.org>1996-06-08 04:30:06 +0000
commit6e00df7691d8cafb93fabc3b9eecd7e066819990 (patch)
treee816499410ac55b7ffac47d42eda5794d265d0ae /usr.bin/units
parent3774de6c030c0688edac6310aefa457f42d7c251 (diff)
downloadFreeBSD-src-6e00df7691d8cafb93fabc3b9eecd7e066819990.zip
FreeBSD-src-6e00df7691d8cafb93fabc3b9eecd7e066819990.tar.gz
Fix exit code when used in non-interactive mode.
Remove ';' typo attached to if statement.
Diffstat (limited to 'usr.bin/units')
-rw-r--r--usr.bin/units/units.c8
1 files changed, 5 insertions, 3 deletions
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);
}
OpenPOWER on IntegriCloud