Module Name:    src
Committed By:   he
Date:           Wed Mar 21 20:02:56 UTC 2012

Modified Files:
        src/common/lib/libc/net: htonl.c htons.c ntohl.c ntohs.c

Log Message:
Lint seems to prefer that we cast via (void*) and not directly to
(u_char*), so follow suit.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/net/htonl.c \
    src/common/lib/libc/net/htons.c src/common/lib/libc/net/ntohl.c \
    src/common/lib/libc/net/ntohs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/net/htonl.c
diff -u src/common/lib/libc/net/htonl.c:1.2 src/common/lib/libc/net/htonl.c:1.3
--- src/common/lib/libc/net/htonl.c:1.2	Mon Jul  4 21:29:16 2011
+++ src/common/lib/libc/net/htonl.c	Wed Mar 21 20:02:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: htonl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $	*/
+/*	$NetBSD: htonl.c,v 1.3 2012/03/21 20:02:56 he Exp $	*/
 
 /*
  * Written by J.T. Conklin <j...@netbsd.org>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: htonl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $");
+__RCSID("$NetBSD: htonl.c,v 1.3 2012/03/21 20:02:56 he Exp $");
 #endif
 
 #include <sys/types.h>
@@ -18,7 +18,7 @@ uint32_t 
 htonl(uint32_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
-	u_char *s = (u_char *)&x;
+	u_char *s = (void *)&x;
 	return (uint32_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]);
 #else
 	return x;
Index: src/common/lib/libc/net/htons.c
diff -u src/common/lib/libc/net/htons.c:1.2 src/common/lib/libc/net/htons.c:1.3
--- src/common/lib/libc/net/htons.c:1.2	Mon Jul  4 21:29:16 2011
+++ src/common/lib/libc/net/htons.c	Wed Mar 21 20:02:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: htons.c,v 1.2 2011/07/04 21:29:16 joerg Exp $	*/
+/*	$NetBSD: htons.c,v 1.3 2012/03/21 20:02:56 he Exp $	*/
 
 /*
  * Written by J.T. Conklin <j...@netbsd.org>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: htons.c,v 1.2 2011/07/04 21:29:16 joerg Exp $");
+__RCSID("$NetBSD: htons.c,v 1.3 2012/03/21 20:02:56 he Exp $");
 #endif
 
 #include <sys/types.h>
@@ -18,7 +18,7 @@ uint16_t
 htons(uint16_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
-	u_char *s = (u_char *) &x;
+	u_char *s = (void *) &x;
 	return (uint16_t)(s[0] << 8 | s[1]);
 #else
 	return x;
Index: src/common/lib/libc/net/ntohl.c
diff -u src/common/lib/libc/net/ntohl.c:1.2 src/common/lib/libc/net/ntohl.c:1.3
--- src/common/lib/libc/net/ntohl.c:1.2	Mon Jul  4 21:29:16 2011
+++ src/common/lib/libc/net/ntohl.c	Wed Mar 21 20:02:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntohl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $	*/
+/*	$NetBSD: ntohl.c,v 1.3 2012/03/21 20:02:56 he Exp $	*/
 
 /*
  * Written by J.T. Conklin <j...@netbsd.org>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: ntohl.c,v 1.2 2011/07/04 21:29:16 joerg Exp $");
+__RCSID("$NetBSD: ntohl.c,v 1.3 2012/03/21 20:02:56 he Exp $");
 #endif
 
 #include <sys/types.h>
@@ -18,7 +18,7 @@ uint32_t
 ntohl(uint32_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
-	u_char *s = (u_char *)&x;
+	u_char *s = (void *)&x;
 	return (uint32_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]);
 #else
 	return x;
Index: src/common/lib/libc/net/ntohs.c
diff -u src/common/lib/libc/net/ntohs.c:1.2 src/common/lib/libc/net/ntohs.c:1.3
--- src/common/lib/libc/net/ntohs.c:1.2	Mon Jul  4 21:29:16 2011
+++ src/common/lib/libc/net/ntohs.c	Wed Mar 21 20:02:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntohs.c,v 1.2 2011/07/04 21:29:16 joerg Exp $	*/
+/*	$NetBSD: ntohs.c,v 1.3 2012/03/21 20:02:56 he Exp $	*/
 
 /*
  * Written by J.T. Conklin <j...@netbsd.org>.
@@ -7,7 +7,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: ntohs.c,v 1.2 2011/07/04 21:29:16 joerg Exp $");
+__RCSID("$NetBSD: ntohs.c,v 1.3 2012/03/21 20:02:56 he Exp $");
 #endif
 
 #include <sys/types.h>
@@ -18,7 +18,7 @@ uint16_t
 ntohs(uint16_t x)
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
-	u_char *s = (u_char *) &x;
+	u_char *s = (void *) &x;
 	return (uint16_t)(s[0] << 8 | s[1]);
 #else
 	return x;

Reply via email to