jpopelka / rpms / net-tools

Forked from rpms/net-tools 4 years ago
Clone
Blob Blame History Raw
diff --git a/lib/interface.c.old b/lib/interface.c
index c734c83..9c49a03 100644
--- a/lib/interface.c.old
+++ b/lib/interface.c
@@ -928,10 +928,10 @@ void ife_print_long(struct interface *ptr)
 	 */
 	rx = ptr->stats.rx_bytes;
 	short_rx = rx * 10;
-	if (rx > 1125899906842624ull) {
-	    if (rx > (9223372036854775807ull / 10))
-		short_rx = rx / 112589990684262ull;
-	    else
+	if (rx > 1152921504606846976ull) {
+		short_rx = rx / 115292150460684697ull;
+		Rext = "EiB";
+	} else if (rx > 1125899906842624ull) {
 		short_rx /= 1125899906842624ull;
 	    Rext = "PiB";
 	} else if (rx > 1099511627776ull) {
@@ -949,10 +949,10 @@ void ife_print_long(struct interface *ptr)
 	}
 	tx = ptr->stats.tx_bytes;
 	short_tx = tx * 10;
-	if (tx > 1125899906842624ull) {
-	    if (tx > (9223372036854775807ull / 10))
-		short_tx = tx / 112589990684262ull;
-	    else
+	if (tx > 1152921504606846976ull) {
+		short_tx = tx / 115292150460684697ull;
+		Text = "EiB";
+	} else if (tx > 1125899906842624ull) {
 		short_tx /= 1125899906842624ull;
 	    Text = "PiB";
 	} else 	if (tx > 1099511627776ull) {