Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc ANSIfy



details:   https://anonhg.NetBSD.org/src/rev/925df96903ae
branches:  trunk
changeset: 766948:925df96903ae
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Jul 04 21:20:27 2011 +0000

description:
ANSIfy

diffstat:

 common/lib/libc/gen/bswap16.c |  7 +++----
 common/lib/libc/gen/bswap32.c |  7 +++----
 common/lib/libc/net/htonl.c   |  7 +++----
 common/lib/libc/net/htons.c   |  7 +++----
 common/lib/libc/net/ntohl.c   |  7 +++----
 common/lib/libc/net/ntohs.c   |  7 +++----
 6 files changed, 18 insertions(+), 24 deletions(-)

diffs (168 lines):

diff -r 04b29c077b2e -r 925df96903ae common/lib/libc/gen/bswap16.c
--- a/common/lib/libc/gen/bswap16.c     Mon Jul 04 20:09:28 2011 +0000
+++ b/common/lib/libc/gen/bswap16.c     Mon Jul 04 21:20:27 2011 +0000
@@ -1,4 +1,4 @@
-/*  $NetBSD: bswap16.c,v 1.2 2008/02/16 17:37:13 apb Exp $    */
+/*  $NetBSD: bswap16.c,v 1.3 2011/07/04 21:20:27 joerg Exp $    */
 
 /*
  * Written by Manuel Bouyer <bouyer%NetBSD.org@localhost>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: bswap16.c,v 1.2 2008/02/16 17:37:13 apb Exp $");
+__RCSID("$NetBSD: bswap16.c,v 1.3 2011/07/04 21:20:27 joerg Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -16,8 +16,7 @@
 #undef bswap16
 
 uint16_t
-bswap16(x)
-       uint16_t x;
+bswap16(uint16_t x)
 {
        return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
 }
diff -r 04b29c077b2e -r 925df96903ae common/lib/libc/gen/bswap32.c
--- a/common/lib/libc/gen/bswap32.c     Mon Jul 04 20:09:28 2011 +0000
+++ b/common/lib/libc/gen/bswap32.c     Mon Jul 04 21:20:27 2011 +0000
@@ -1,4 +1,4 @@
-/*  $NetBSD: bswap32.c,v 1.2 2008/02/16 17:37:13 apb Exp $    */
+/*  $NetBSD: bswap32.c,v 1.3 2011/07/04 21:20:27 joerg Exp $    */
 
 /*
  * Written by Manuel Bouyer <bouyer%NetBSD.org@localhost>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: bswap32.c,v 1.2 2008/02/16 17:37:13 apb Exp $");
+__RCSID("$NetBSD: bswap32.c,v 1.3 2011/07/04 21:20:27 joerg Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -16,8 +16,7 @@
 #undef bswap32
 
 uint32_t
-bswap32(x)
-       uint32_t x;
+bswap32(uint32_t x)
 {
        return  ((x << 24) & 0xff000000 ) |
                ((x <<  8) & 0x00ff0000 ) |
diff -r 04b29c077b2e -r 925df96903ae common/lib/libc/net/htonl.c
--- a/common/lib/libc/net/htonl.c       Mon Jul 04 20:09:28 2011 +0000
+++ b/common/lib/libc/net/htonl.c       Mon Jul 04 21:20:27 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: htonl.c,v 1.1 2005/12/20 19:28:51 christos Exp $       */
+/*     $NetBSD: htonl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $  */
 
 /*
  * Written by J.T. Conklin <jtc%NetBSD.org@localhost>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: htonl.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
+__RCSID("$NetBSD: htonl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $");
 #endif
 
 #include <sys/types.h>
@@ -15,8 +15,7 @@
 #undef htonl
 
 uint32_t 
-htonl(x)
-       uint32_t x;
+htonl(uint32_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
        u_char *s = (u_char *)&x;
diff -r 04b29c077b2e -r 925df96903ae common/lib/libc/net/htons.c
--- a/common/lib/libc/net/htons.c       Mon Jul 04 20:09:28 2011 +0000
+++ b/common/lib/libc/net/htons.c       Mon Jul 04 21:20:27 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: htons.c,v 1.1 2005/12/20 19:28:51 christos Exp $       */
+/*     $NetBSD: htons.c,v 1.2 2011/07/04 21:29:16 joerg Exp $  */
 
 /*
  * Written by J.T. Conklin <jtc%NetBSD.org@localhost>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: htons.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
+__RCSID("$NetBSD: htons.c,v 1.2 2011/07/04 21:29:16 joerg Exp $");
 #endif
 
 #include <sys/types.h>
@@ -15,8 +15,7 @@
 #undef htons
 
 uint16_t
-htons(x)
-       uint16_t x;
+htons(uint16_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
        u_char *s = (u_char *) &x;
diff -r 04b29c077b2e -r 925df96903ae common/lib/libc/net/ntohl.c
--- a/common/lib/libc/net/ntohl.c       Mon Jul 04 20:09:28 2011 +0000
+++ b/common/lib/libc/net/ntohl.c       Mon Jul 04 21:20:27 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntohl.c,v 1.1 2005/12/20 19:28:51 christos Exp $       */
+/*     $NetBSD: ntohl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $  */
 
 /*
  * Written by J.T. Conklin <jtc%NetBSD.org@localhost>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: ntohl.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
+__RCSID("$NetBSD: ntohl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $");
 #endif
 
 #include <sys/types.h>
@@ -15,8 +15,7 @@
 #undef ntohl
 
 uint32_t
-ntohl(x)
-       uint32_t x;
+ntohl(uint32_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
        u_char *s = (u_char *)&x;
diff -r 04b29c077b2e -r 925df96903ae common/lib/libc/net/ntohs.c
--- a/common/lib/libc/net/ntohs.c       Mon Jul 04 20:09:28 2011 +0000
+++ b/common/lib/libc/net/ntohs.c       Mon Jul 04 21:20:27 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntohs.c,v 1.1 2005/12/20 19:28:51 christos Exp $       */
+/*     $NetBSD: ntohs.c,v 1.2 2011/07/04 21:29:16 joerg Exp $  */
 
 /*
  * Written by J.T. Conklin <jtc%NetBSD.org@localhost>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: ntohs.c,v 1.1 2005/12/20 19:28:51 christos Exp $");
+__RCSID("$NetBSD: ntohs.c,v 1.2 2011/07/04 21:29:16 joerg Exp $");
 #endif
 
 #include <sys/types.h>
@@ -15,8 +15,7 @@
 #undef ntohs
 
 uint16_t
-ntohs(x)
-       uint16_t x;
+ntohs(uint16_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
        u_char *s = (u_char *) &x;



Home | Main Index | Thread Index | Old Index