diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-10 06:20:09 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-10 06:20:09 +0000 |
commit | 560842d4cf949f39d53e6861b2bb97cb706fe5bf (patch) | |
tree | cfb7cc640708b37df752c76778254bff35990d98 /lib/libc/net/htonl.c | |
parent | 50cf773ce874b899c477500f5742d063ff08c2c5 (diff) |
make 64 bit clean
Diffstat (limited to 'lib/libc/net/htonl.c')
-rw-r--r-- | lib/libc/net/htonl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/net/htonl.c b/lib/libc/net/htonl.c index ac85cb0fd7d..d0a22e1f30d 100644 --- a/lib/libc/net/htonl.c +++ b/lib/libc/net/htonl.c @@ -1,4 +1,4 @@ -/* $NetBSD: htonl.c,v 1.5 1995/04/28 23:25:14 jtc Exp $ */ +/* $NetBSD: htonl.c,v 1.5.6.1 1996/05/29 23:28:06 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.5 1995/04/28 23:25:14 jtc Exp $"; +static char *rcsid = "$NetBSD: htonl.c,v 1.5.6.1 1996/05/29 23:28:06 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 |