]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Update split.c 558/head
authorEmin Kokalari <eminkokalari@gmail.com>
Mon, 3 Nov 2025 15:56:38 +0000 (16:56 +0100)
committerGitHub <noreply@github.com>
Mon, 3 Nov 2025 15:56:38 +0000 (16:56 +0100)
Enhanced the ping times from Int to Float values

ui/split.c

index 60520e813054f18bc1e5ef0cf0881d81d5018b6f..f8c250c37ca0e7643be93d4ada123a1c11744664 100644 (file)
@@ -102,10 +102,10 @@ void split_redraw(
                 name = str;
             }
             /* May be we should test name's length */
-            snprintf(newLine, sizeof(newLine), "%s %d %d %d %d %d %d",
+            snprintf(newLine, sizeof(newLine), "%s %d %d %d %.1f %.1f %.1f",
                      name, net_loss(at), net_returned(at), net_xmit(at),
-                     net_best(at) / 1000, net_avg(at) / 1000,
-                     net_worst(at) / 1000);
+                     net_best(at) / 1000.0, net_avg(at) / 1000.0,
+                     net_worst(at) / 1000.0);
         } else {
             snprintf(newLine, sizeof(newLine), "???");
         }