summaryrefslogtreecommitdiffstats
path: root/larn/main.c
diff options
context:
space:
mode:
authorveego <veego@NetBSD.org>1998-08-30 09:19:36 +0000
committerveego <veego@NetBSD.org>1998-08-30 09:19:36 +0000
commit5a555a984855e94b0fc3c9154da6b65208ba2c70 (patch)
tree285ed9cc28655053e6f1520670b43ae864d0c264 /larn/main.c
parentc4c1ed4f214d1b50a09d0c42fa9c741ac18fb482 (diff)
downloadbsdgames-darwin-5a555a984855e94b0fc3c9154da6b65208ba2c70.tar.gz
bsdgames-darwin-5a555a984855e94b0fc3c9154da6b65208ba2c70.tar.zst
bsdgames-darwin-5a555a984855e94b0fc3c9154da6b65208ba2c70.zip
Add braces to make the new egcs happy.
Diffstat (limited to 'larn/main.c')
-rw-r--r--larn/main.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/larn/main.c b/larn/main.c
index d386ed36..fbc0fc6f 100644
--- a/larn/main.c
+++ b/larn/main.c
@@ -1,9 +1,9 @@
-/* $NetBSD: main.c,v 1.13 1998/07/27 01:12:35 mycroft Exp $ */
+/* $NetBSD: main.c,v 1.14 1998/08/30 09:19:38 veego Exp $ */
/* main.c */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.13 1998/07/27 01:12:35 mycroft Exp $");
+__RCSID("$NetBSD: main.c,v 1.14 1998/08/30 09:19:38 veego Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -72,15 +72,17 @@ main(argc, argv)
init_term(); /* setup the terminal (find out what type)
* for termcap */
#endif /* VT100 */
- if (((ptr = getlogin()) == 0) || (*ptr == 0)) /* try to get login name */
- if ((pwe = getpwuid(getuid())) != NULL)/* can we get it from
- * /etc/passwd? */
+ /* try to get login name */
+ if (((ptr = getlogin()) == 0) || (*ptr == 0)) {
+ /* can we get it from /etc/passwd? */
+ if ((pwe = getpwuid(getuid())) != NULL)
ptr = pwe->pw_name;
else if ((ptr = getenv("USER")) == 0)
if ((ptr = getenv("LOGNAME")) == 0) {
noone: write(2, "Can't find your logname. Who Are You?\n", 39);
exit(1);
}
+ }
if (ptr == 0)
goto noone;
if (strlen(ptr) == 0)
@@ -1201,7 +1203,7 @@ eatcookie()
while (1) {
if ((i = whatitem("eat")) == '\33')
return;
- if (i != '.')
+ if (i != '.') {
if (i == '*')
showeat();
else {
@@ -1223,6 +1225,7 @@ eatcookie()
lprcat("\nYou can't eat that!");
return;
}
+ }
}
}