X-Git-Url: https://git.sur5r.net/?p=gsconf;a=blobdiff_plain;f=shell_port.c;h=9ac059d262ef0412c2256b9e01fbd28b59d46330;hp=2dbf94e7c1ced3f9606c7315e949a0d13e9224fe;hb=76bba375139c9c81ccf62cde41d90e4b5ea1112b;hpb=2531679f54aac584bdcc922d7727600845ecb23b diff --git a/shell_port.c b/shell_port.c index 2dbf94e..9ac059d 100644 --- a/shell_port.c +++ b/shell_port.c @@ -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; }