diff options
author | 1996-06-10 07:27:40 +0000 | |
---|---|---|
committer | 1996-06-10 07:27:40 +0000 | |
commit | ab678234c1c6e9b28dc9221dd620d064fbbdd88a (patch) | |
tree | 2f9761a71cc5571ef43af342e5785fa39c06b60a /sys/lib/libkern/htonl.c | |
parent | data structure handling fix (diff) | |
download | wireguard-openbsd-ab678234c1c6e9b28dc9221dd620d064fbbdd88a.tar.xz wireguard-openbsd-ab678234c1c6e9b28dc9221dd620d064fbbdd88a.zip |
64 bit clean
Diffstat (limited to 'sys/lib/libkern/htonl.c')
-rw-r--r-- | sys/lib/libkern/htonl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/lib/libkern/htonl.c b/sys/lib/libkern/htonl.c index 971757f2028..eba75f7e2c6 100644 --- a/sys/lib/libkern/htonl.c +++ b/sys/lib/libkern/htonl.c @@ -1,4 +1,4 @@ -/* $NetBSD: htonl.c,v 1.6 1995/10/07 09:26:26 mycroft Exp $ */ +/* $NetBSD: htonl.c,v 1.6.6.1 1996/05/29 23:47:55 cgd Exp $ */ /* * Written by J.T. Conklin <jtc@netbsd.org>. @@ -6,7 +6,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$NetBSD: htonl.c,v 1.6 1995/10/07 09:26:26 mycroft Exp $"; +static char *rcsid = "$NetBSD: htonl.c,v 1.6.6.1 1996/05/29 23:47:55 cgd Exp $"; #endif #include <sys/types.h> @@ -22,7 +22,7 @@ htonl(x) #if BYTE_ORDER == LITTLE_ENDIAN u_char *s = (u_char *)&y; - return s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]; + return (u_int32_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]); #else return y; #endif |