diff options
author | shin <shin@FreeBSD.org> | 2000-03-14 17:37:19 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-03-14 17:37:19 +0000 |
commit | d509b238de89ee14f9c55741b24d2add9bd938fe (patch) | |
tree | 8bfc4824fa2c4acbef9cdac618f8428ed460b53b /sbin/ping/ping.c | |
parent | 6b6b811e629dbeec39dd574040ffbf04fa66ef97 (diff) | |
download | FreeBSD-src-d509b238de89ee14f9c55741b24d2add9bd938fe.zip FreeBSD-src-d509b238de89ee14f9c55741b24d2add9bd938fe.tar.gz |
Use CMSG_LEN() to compute ping SCM_TIMESTAMP cmsg_len.
Without this, cmsg_len size should be smaller than necessary on alpha.
(Though, no obvious error was seen on ping time value on beast.)
Diffstat (limited to 'sbin/ping/ping.c')
-rw-r--r-- | sbin/ping/ping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 9c42f93..39e6bec 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -649,7 +649,7 @@ main(argc, argv) #ifdef SO_TIMESTAMP if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_TIMESTAMP && - cmsg->cmsg_len == (sizeof *cmsg + sizeof *t)) { + cmsg->cmsg_len == CMSG_LEN(sizeof *t)) { /* Copy to avoid alignment problems: */ memcpy(&now,CMSG_DATA(cmsg),sizeof(now)); t = &now; |