Skip to content

Commit

Permalink
Remove compiler warning :
Browse files Browse the repository at this point in the history
warning: suggest explicit braces to avoid ambiguous ‘else’
  • Loading branch information
hartkopp committed May 14, 2010
1 parent 62c030b commit 5655d53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion canbusload.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,12 @@ void printstats(int signo)

for (i=0; i<currmax; i++) {

if (color)
if (color) {
if (i%2)
printf("%s", FGRED);
else
printf("%s", FGBLUE);
}

if (stat[i].bitrate)
percent = (stat[i].recv_bits_total*100)/stat[i].bitrate;
Expand Down
3 changes: 2 additions & 1 deletion canplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,12 @@ int main(int argc, char **argv)
loops = 1;
}

if (verbose > 1) /* use -v -v to see this */
if (verbose > 1) { /* use -v -v to see this */
if (infinite_loops)
printf("infinite_loops\n");
else
printf("%d loops\n", loops);
}

sleep_ts.tv_sec = gap / 1000;
sleep_ts.tv_nsec = (gap % 1000) * 1000000;
Expand Down

0 comments on commit 5655d53

Please sign in to comment.