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/htons.c | |
parent | 50cf773ce874b899c477500f5742d063ff08c2c5 (diff) |
make 64 bit clean
Diffstat (limited to 'lib/libc/net/htons.c')
-rw-r--r-- | lib/libc/net/htons.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/net/htons.c b/lib/libc/net/htons.c index 9b1de6ccfcf..0ecb62b95cd 100644 --- a/lib/libc/net/htons.c +++ b/lib/libc/net/htons.c @@ -1,4 +1,4 @@ -/* $NetBSD: htons.c,v 1.5 1995/04/28 23:25:19 jtc Exp $ */ +/* $NetBSD: htons.c,v 1.5.6.1 1996/05/29 23:28:19 cgd Exp $ */ /* * Written by J.T. Conklin <jtc@netbsd.org>. @@ -6,7 +6,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$NetBSD: htons.c,v 1.5 1995/04/28 23:25:19 jtc Exp $"; +static char *rcsid = "$NetBSD: htons.c,v 1.5.6.1 1996/05/29 23:28:19 cgd Exp $"; #endif #include <sys/types.h> @@ -24,7 +24,7 @@ htons(x) { #if BYTE_ORDER == LITTLE_ENDIAN u_char *s = (u_char *) &x; - return s[0] << 8 | s[1]; + return (u_int16_t)(s[0] << 8 | s[1]); #else return x; #endif |