Lint seems to prefer that we cast via (void*) and not directly to trunk
authorhe <he@NetBSD.org>
Wed, 21 Mar 2012 20:02:56 +0000
branchtrunk
changeset 210135 eb682f326b6d
parent 210134 bd1a32fa9cd7
child 210136 3a0409f9121f
Lint seems to prefer that we cast via (void*) and not directly to (u_char*), so follow suit.
common/lib/libc/net/htonl.c
common/lib/libc/net/htons.c
common/lib/libc/net/ntohl.c
common/lib/libc/net/ntohs.c
--- a/common/lib/libc/net/htonl.c	Wed Mar 21 19:59:18 2012 +0000
+++ b/common/lib/libc/net/htonl.c	Wed Mar 21 20:02:56 2012 +0000
@@ -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 <jtc@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 @@
 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;
--- a/common/lib/libc/net/htons.c	Wed Mar 21 19:59:18 2012 +0000
+++ b/common/lib/libc/net/htons.c	Wed Mar 21 20:02:56 2012 +0000
@@ -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 <jtc@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 @@
 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;
--- a/common/lib/libc/net/ntohl.c	Wed Mar 21 19:59:18 2012 +0000
+++ b/common/lib/libc/net/ntohl.c	Wed Mar 21 20:02:56 2012 +0000
@@ -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 <jtc@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 @@
 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;
--- a/common/lib/libc/net/ntohs.c	Wed Mar 21 19:59:18 2012 +0000
+++ b/common/lib/libc/net/ntohs.c	Wed Mar 21 20:02:56 2012 +0000
@@ -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 <jtc@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 @@
 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;