MFC r350993, r350997, r351079-r351080, r351082, r351090, r351101-r351102
r350993:
Consistently use the byteorder functions in the correct direction
Though ntohs and htons are functionally identical, they have different meanings.Using the correct one helps to document the code.
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21219
r350997:
ping6: use the monotonic clock to measure durations
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21226
r351079:
ping6: quiet warning about unused copyright variable
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21270
r351080:
ping6: quiet an undefined variable warning
GCC 4.2 isn't smart enough to know that this variable is already defined by
the time it's used.
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21269
r351082:
ping6: fix uninitialized variable warning for intvl
GCC isn't smart enough to realize that this variable was always initialized.
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21271
r351090:
ping6: Fix data type of the buffer for ancillary data of a received message
The old code worked, but wasted some stack space.
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21275
r351101:
ping6: fix uninitialized variable warnings when MK_CASPER=no
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21273
r351102:
ping6: Fix alignment errors
This fixes -Wcast-align errors when compiled with WARNS=6.
Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21217