]> rtime.felk.cvut.cz Git - sojka/can-utils.git/commitdiff
Remove compiler warning :
authorOliver Hartkopp <socketcan@hartkopp.net>
Fri, 14 May 2010 12:50:17 +0000 (12:50 +0000)
committerOliver Hartkopp <socketcan@hartkopp.net>
Fri, 14 May 2010 12:50:17 +0000 (12:50 +0000)
warning: suggest explicit braces to avoid ambiguous ‘else’

canbusload.c
canplayer.c

index d849c77a7a19e8cb7b4811ed629cdac15b9e9c38..36f3423e0aca9f24d6e7883c9e6fced729532d3d 100644 (file)
@@ -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;
index 9494a6d44cf10efdd75f0e408267ea0baceeb9a7..c3e739d74ff00884d1832ad02100f7be3ae58ab4 100644 (file)
@@ -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;