diff options
| author | 2001-06-23 16:15:56 +0000 | |
|---|---|---|
| committer | 2001-06-23 16:15:56 +0000 | |
| commit | df438d22760400a97e5097c877358a14673e7179 (patch) | |
| tree | b1c3af5c38b46489d431d7cf64296b0f79109b41 /sys/netinet/raw_ip.c | |
| parent | Bring in a bunch of improvements from NetBSD. (diff) | |
| download | wireguard-openbsd-df438d22760400a97e5097c877358a14673e7179.tar.xz wireguard-openbsd-df438d22760400a97e5097c877358a14673e7179.zip | |
Remove unneeded ip_id convertions.
Instead of using HTONS macro in some places, use htons directly in the
struct member and save us a few bytes.
Fix comment.
Diffstat (limited to 'sys/netinet/raw_ip.c')
| -rw-r--r-- | sys/netinet/raw_ip.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index ac3f2b02829..c9c4b08002b 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip.c,v 1.23 2001/06/08 03:53:46 angelos Exp $ */ +/* $OpenBSD: raw_ip.c,v 1.24 2001/06/23 16:15:56 fgsch Exp $ */ /* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */ /* @@ -244,8 +244,7 @@ rip_output(m, va_alist) return (EINVAL); } if (ip->ip_id == 0) { - ip->ip_id = ip_randomid(); - HTONS(ip->ip_id); + ip->ip_id = htons(ip_randomid()); } /* XXX prevent ip_output from overwriting header fields */ flags |= IP_RAWOUTPUT; |
