From: Eric S. Raymond Date: Thu, 9 Jan 2014 16:57:46 +0000 (-0500) Subject: Fix potentially ambiguous braces. X-Git-Tag: 2.10~8 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=3394b963410597c2fa43e69adffa54035ff8f7ee;p=bs.git Fix potentially ambiguous braces. Patch suggested by Dennis Pinckard . --- diff --git a/bs.c b/bs.c index 995ae0d..2484940 100644 --- 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