• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

schweikert / fping / 7773542006 / 3
88%
master: 80%

Build:
Build:
LAST BUILD BRANCH: netbsd-compat
DEFAULT BRANCH: master
Ran 04 Feb 2024 11:00AM UTC
Files 4
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Feb 2024 10:57AM UTC coverage: 75.518%. Remained the same
7773542006.3

push

github

schweikert
Defensive coding: guard against a division by zero

In the function print_per_system_stats(), if packets have been
lost, the number of sent packets is checked to be positive before
dividing by it.  If no packets have been lost, this is not checked.
Either the existing check is not needed, or both code paths need
the check.

The function print_per_system_splits() is quite similar to
print_per_system_stats(), and has the equivalent guards against a
division by zero in both code paths, not just one of them.

In the spirit of defensive coding, I think it is better to be safe
and add the missing guard against a division by zero.

1021 of 1352 relevant lines covered (75.52%)

55.36 hits per line

Source Files on job macos - 7773542006.3
  • Tree
  • List 4
  • Changed 1
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 7773542006
  • 290d944b on github
  • Prev Job for on develop (#7773540004.1)
  • Next Job for on develop (#7811589446.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc