Fix calculation of loss percentage
authorHervé Poussineau <hpoussin@reactos.org>
Thu, 1 Jun 2006 18:27:08 +0000 (18:27 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Thu, 1 Jun 2006 18:27:08 +0000 (18:27 +0000)
svn path=/trunk/; revision=22156

reactos/base/applications/network/ping/ping.c

index 5d2efba..6a9b679 100644 (file)
@@ -606,11 +606,7 @@ int main(int argc, char* argv[])
         }
 
         /* Calculate loss percent */
-        if (LostCount > 0) {
-            Count = (SentCount * 100) / LostCount;
-        } else {
-            Count = 0;
-        }
+        Count = (LostCount * 100) / SentCount;
 
         if (!MinRTTSet)
             MinRTT = MaxRTT;