summaryrefslogtreecommitdiffstats
path: root/games/larn/main.c
diff options
context:
space:
mode:
authorbillf <billf@FreeBSD.org>1999-09-07 06:00:03 +0000
committerbillf <billf@FreeBSD.org>1999-09-07 06:00:03 +0000
commit3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4 (patch)
treea392a79dd376bd7e8273e85fac9e7af604437b66 /games/larn/main.c
parent33adb981d4021526b69c31fe25c2fc524378289f (diff)
downloadFreeBSD-src-3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4.zip
FreeBSD-src-3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4.tar.gz
Avoid ambigious if() if() else().
Diffstat (limited to 'games/larn/main.c')
-rw-r--r--games/larn/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/games/larn/main.c b/games/larn/main.c
index 49d3a2d..c42723e 100644
--- a/games/larn/main.c
+++ b/games/larn/main.c
@@ -50,7 +50,7 @@ main(argc,argv)
#ifndef VT100
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 (((ptr = getlogin()) == 0) || (*ptr==0)) { /* try to get login name */
if (pwe=getpwuid(getuid())) /* can we get it from /etc/passwd? */
ptr = pwe->pw_name;
else
@@ -60,6 +60,7 @@ main(argc,argv)
noone: write(2, "Can't find your logname. Who Are You?\n",39);
exit(1);
}
+ }
if (ptr==0) goto noone;
if (strlen(ptr)==0) goto noone;
/*
@@ -788,7 +789,7 @@ char *p;
while (1)
{
if ((i = whatitem("eat"))=='\33') return;
- if (i != '.')
+ if (i != '.') {
if (i=='*') showeat(); else
{
if (iven[i-'a']==OCOOKIE)
@@ -808,6 +809,7 @@ while (1)
if (iven[i-'a']==0) { ydhi(i); return; }
lprcat("\nYou can't eat that!"); return;
}
+ }
}
}
OpenPOWER on IntegriCloud