From 9e7b57ade6273cbd06e5aed1ed69dc20ba4cc058 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 10 Jun 1996 07:27:43 +0000 Subject: 64 bit clean --- sys/lib/libkern/htons.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/lib/libkern/htons.c') diff --git a/sys/lib/libkern/htons.c b/sys/lib/libkern/htons.c index 6d491588b59..0b60f639f8e 100644 --- a/sys/lib/libkern/htons.c +++ b/sys/lib/libkern/htons.c @@ -1,4 +1,4 @@ -/* $NetBSD: htons.c,v 1.6 1995/10/07 09:26:27 mycroft Exp $ */ +/* $NetBSD: htons.c,v 1.6.6.1 1996/05/29 23:48:02 cgd Exp $ */ /* * Written by J.T. Conklin . @@ -6,7 +6,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$NetBSD: htons.c,v 1.6 1995/10/07 09:26:27 mycroft Exp $"; +static char *rcsid = "$NetBSD: htons.c,v 1.6.6.1 1996/05/29 23:48:02 cgd Exp $"; #endif #include @@ -20,7 +20,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 -- cgit v1.2.3