]> git.sur5r.net Git - gsconf/blobdiff - shell_port.c
A bunch of fixes for various compiler warnings
[gsconf] / shell_port.c
index 2dbf94e7c1ced3f9606c7315e949a0d13e9224fe..9ac059d262ef0412c2256b9e01fbd28b59d46330 100644 (file)
@@ -11,7 +11,7 @@ void shell_port(char ** argv, int elem) {
         if (strncmp(argv[1], "show", 4) == 0) {
                 printf("Port\tSpeed\t\tBytes In\t\tBytes Out\n");
                 for (n = 0; n< 5; n++) {
-                        printf("%i\t%s\t% 8lu\t\t% 8lu\n", n, 
+                        printf("%i\t%s\t%8lu\t\t%8lu\n", n,
                         (settings.portStatistics[n].state == 0x05 ? "1000 Mbit/s" : (settings.portStatistics[n].state == 0x04 ? "100 Mbit/s" : (settings.portStatistics[n].state == 0x03 ? "10 Mbit/s":  (settings.portStatistics[n].state == 0x00 ? "No Cable": "???")))),
                         settings.portStatistics[n].bytesIn,
                         settings.portStatistics[n].bytesOut
@@ -25,7 +25,7 @@ void shell_port(char ** argv, int elem) {
                 
                 n = atoi(argv[2]);
                 
-                if (n < 1 | n > 5) {
+                if ((n < 1) | (n > 5)) {
                         printf("Invalid Port\n");
                         return;
                 }
@@ -66,7 +66,7 @@ void shell_port(char ** argv, int elem) {
                 
                 n = atoi(argv[2]);
                 
-                if (n < 1 | n > 5) {
+                if ((n < 1) | (n > 5)) {
                         printf("Invalid Port %i\n", n);
                         return;
                 }
@@ -75,7 +75,7 @@ void shell_port(char ** argv, int elem) {
                 
                 for (m = 3; m < elem; m++) {
                         i = atoi(argv[m]);
-                        if (i < 1 | i > 5) {
+                        if ((i < 1) | (i > 5)) {
                                 printf("Invalid Port %i\n", i);
                                 return;
                         }