CVSROOT:        /cvs
Module name:    src
Changes by:     chel...@cvs.openbsd.org 2020/01/03 18:00:18

Modified files:
        sbin/ping      : ping.c ping.8 

Log message:
ping(8): improve "-i wait" parsing and error-checking code

- Never accept negative values.

- Cap the interval at UINT_MAX seconds to avoid strange rounding
behavior at the end of the input range.

- Use error messages that resemble other parts of the tree where we
are able to use strtonum(3).

- Leverage modf(3) for cleaner code.

- Call it "-i interval" to avoid accidental visual similarity to
"-w maxwait".

With input from cjeker@, kettenis@, kn@.

ok kn@

Reply via email to