From 585c056622af4adfe762a48f81c1ff7060880fea Mon Sep 17 00:00:00 2001 From: tholo <> Date: Thu, 12 Dec 1996 03:19:56 +0000 Subject: Update {hton,ntoh}[ls] argument and return types to match changes in --- src/lib/libc/net/ntohl.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/lib/libc/net/ntohl.c') diff --git a/src/lib/libc/net/ntohl.c b/src/lib/libc/net/ntohl.c index 0947a071ae..7d3e227e60 100644 --- a/src/lib/libc/net/ntohl.c +++ b/src/lib/libc/net/ntohl.c @@ -4,7 +4,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: ntohl.c,v 1.3 1996/08/19 08:29:33 tholo Exp $"; +static char *rcsid = "$OpenBSD: ntohl.c,v 1.4 1996/12/12 03:19:56 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -12,16 +12,14 @@ static char *rcsid = "$OpenBSD: ntohl.c,v 1.3 1996/08/19 08:29:33 tholo Exp $"; #undef ntohl -unsigned long +u_int32_t ntohl(x) - unsigned long x; + u_int32_t x; { - u_int32_t y = x; - #if BYTE_ORDER == LITTLE_ENDIAN - u_char *s = (u_char *)&y; + u_char *s = (u_char *)&x; return (u_int32_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]); #else - return y; + return x; #endif } -- cgit v1.2.3-55-g6feb