summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-11-24 19:25:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-11-24 19:25:03 +0000
commit6724ff1c286b0b54cc19ca6d36d7cf04204844ba (patch)
tree5482c914c4adaf9f397e293fc17cf392b7dfc7e0 /sys
parent0ea53f7ab1c3a3c697c160359079e8d91662c286 (diff)
ansi C
Diffstat (limited to 'sys')
-rw-r--r--sys/lib/libkern/htonl.c7
-rw-r--r--sys/lib/libkern/htons.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/lib/libkern/htonl.c b/sys/lib/libkern/htonl.c
index ad1b47b98d2..2c72cbf0862 100644
--- a/sys/lib/libkern/htonl.c
+++ b/sys/lib/libkern/htonl.c
@@ -4,7 +4,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: htonl.c,v 1.5 2004/11/28 07:23:41 mickey Exp $";
+static char *rcsid = "$OpenBSD: htonl.c,v 1.6 2007/11/24 19:25:02 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -12,9 +12,10 @@ static char *rcsid = "$OpenBSD: htonl.c,v 1.5 2004/11/28 07:23:41 mickey Exp $";
#undef htonl
+u_int32_t htonl(u_int32_t);
+
u_int32_t
-htonl(x)
- u_int32_t x;
+htonl(u_int32_t x)
{
#if BYTE_ORDER == LITTLE_ENDIAN
u_char *s = (u_char *)&x;
diff --git a/sys/lib/libkern/htons.c b/sys/lib/libkern/htons.c
index 9a8d4053cf7..47ffe694094 100644
--- a/sys/lib/libkern/htons.c
+++ b/sys/lib/libkern/htons.c
@@ -4,7 +4,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: htons.c,v 1.5 2004/11/28 07:23:41 mickey Exp $";
+static char *rcsid = "$OpenBSD: htons.c,v 1.6 2007/11/24 19:25:02 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -12,6 +12,8 @@ static char *rcsid = "$OpenBSD: htons.c,v 1.5 2004/11/28 07:23:41 mickey Exp $";
#undef htons
+u_int16_t htons(u_int16_t);
+
u_int16_t
htons(u_int16_t x)
{