summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2007-11-24 19:25:02 +0000
committerderaadt <deraadt@openbsd.org>2007-11-24 19:25:02 +0000
commitba95abb506c535ebbbcb620620bf22e9935c137b (patch)
tree6761f3f26558608032b3ae4095a06dc41d96a1ae /sys
parentnew sentence, new line; (diff)
downloadwireguard-openbsd-ba95abb506c535ebbbcb620620bf22e9935c137b.tar.xz
wireguard-openbsd-ba95abb506c535ebbbcb620620bf22e9935c137b.zip
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)
{