]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/blobdiff - tc/tc_util.c
iproute: fix tc -iec display of Mibit rates
[lisovros/iproute2_canprio.git] / tc / tc_util.c
index 5829d61383c9f8fe3626ef7c95fb59ff2c19ed50..36e3c7df9a2f6711d95073ecef0e6d627062c035 100644 (file)
@@ -203,7 +203,7 @@ void print_rate(char *buf, int len, __u32 rate)
 
        if (use_iec) {
                if (tmp >= 1000.0*1024.0*1024.0)
-                       snprintf(buf, len, "%.0fMibit", tmp/1024.0*1024.0);
+                       snprintf(buf, len, "%.0fMibit", tmp/(1024.0*1024.0));
                else if (tmp >= 1000.0*1024)
                        snprintf(buf, len, "%.0fKibit", tmp/1024);
                else