summaryrefslogtreecommitdiff
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-06-23 16:15:57 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-06-23 16:15:57 +0000
commit49c9f8d69c19d87dbdc67c2ce02a8f6b67f49b83 (patch)
tree3b9ea94ac43aa3e61363aa7b9f556ada85c2d3ef /sys/netinet/raw_ip.c
parentcef2c01a710f772eedb6f3e6ebca133851d5c7d8 (diff)
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.c5
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;