]> thyrsus.com Git - bs.git/commitdiff
Fix potentially ambiguous braces.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 9 Jan 2014 16:57:46 +0000 (11:57 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 9 Jan 2014 16:57:46 +0000 (11:57 -0500)
Patch suggested by Dennis Pinckard <dpinckard@pinckard.us>.

bs.c

diff --git a/bs.c b/bs.c
index 995ae0dce01f0ec83c550ada4a021b31cc456435..248494027ae9e7f5e638a231ec3d852e1cdaee8c 100644 (file)
--- a/bs.c
+++ b/bs.c
@@ -841,10 +841,12 @@ static int plyturn(void)
     cgoto(cury, curx);
 #ifdef A_COLOR
     if (has_colors())
+    {
        if (hit)
            attron(COLOR_PAIR(COLOR_RED));
        else
            attron(COLOR_PAIR(COLOR_GREEN));
+    }
 #endif /* A_COLOR */
     (void) addch((chtype)hits[PLAYER][curx][cury]);
 #ifdef A_COLOR
@@ -978,11 +980,13 @@ static int cpufire(int x, int y)
 
     pgoto(y, x);
 #ifdef A_COLOR
-    if (has_colors())
-       if (hit)
-           attron(COLOR_PAIR(COLOR_RED));
-       else
-           attron(COLOR_PAIR(COLOR_GREEN));
+       if (has_colors())
+       {
+           if (hit)
+               attron(COLOR_PAIR(COLOR_RED));
+           else
+               attron(COLOR_PAIR(COLOR_GREEN));
+       }
 #endif /* A_COLOR */
     (void)addch((chtype)(hit ? SHOWHIT : SHOWSPLASH));
 #ifdef A_COLOR