diff options
| author | Zhaoqi Xu <[email protected]> | 2026-10-06 14:07:59 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-10-14 09:33:19 +0800 |
| commit | 8ec9d87959fe27682e02ced7158012d8fb0048c1 (patch) | |
| tree | eff186bf965119027d291d00560fb988d6b4279b /components/module/interface/include | |
| parent | 517eecbe4a84755b76d8a11e5b00851a1048c1aa (diff) | |
[components][netdev] fix divide-by-zero in ping statistics when no reply
netdev_cmd_ping() computed avg_time / received before checking that any
reply arrived. When every request times out, received is 0 and the
integer division traps (SIGFPE on the simulator, a fault on Cortex-M),
taking the shell thread down. Only compute the average inside the
existing received > 0 branch where it is printed.
Fixes #11852
Diffstat (limited to 'components/module/interface/include')
0 files changed, 0 insertions, 0 deletions
