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

schweikert / fping / 7773542006
88%
master: 80%

Build:
Build:
LAST BUILD BRANCH: issue/62-dev
DEFAULT BRANCH: master
Ran 04 Feb 2024 10:59AM UTC
Jobs 3
Files 4
Run time 2s
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: 82.67% (+0.07%) from 82.596%
7773542006

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.

1121 of 1356 relevant lines covered (82.67%)

183.02 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ubuntu-20.04 - 7773542006.1 04 Feb 2024 10:59AM UTC 4
78.83
GitHub Action Run
2 ubuntu-22.04 - 7773542006.2 04 Feb 2024 10:59AM UTC 4
78.75
GitHub Action Run
3 macos - 7773542006.3 04 Feb 2024 11:00AM UTC 4
75.52
GitHub Action Run
Source Files on build 7773542006
  • Tree
  • List 4
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 290d944b on github
  • Prev Build on develop (#7773540004)
  • Next Build on develop (#7811589446)
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

© 2025 Coveralls, Inc