Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/sys Add casts for big endian machines
details: https://anonhg.NetBSD.org/src/rev/acd309dbf9d6
branches: trunk
changeset: 334724:acd309dbf9d6
user: christos <christos%NetBSD.org@localhost>
date: Wed Dec 03 13:10:49 2014 +0000
description:
Add casts for big endian machines
diffstat:
tests/sys/netinet/t_print.c | 8 ++++----
tests/sys/netinet6/t_print.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r 37fdb1301307 -r acd309dbf9d6 tests/sys/netinet/t_print.c
--- a/tests/sys/netinet/t_print.c Wed Dec 03 08:14:26 2014 +0000
+++ b/tests/sys/netinet/t_print.c Wed Dec 03 13:10:49 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $ */
+/* $NetBSD: t_print.c,v 1.2 2014/12/03 13:10:49 christos Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $");
+__RCSID("$NetBSD: t_print.c,v 1.2 2014/12/03 13:10:49 christos Exp $");
#include "netinet/in_print.c"
@@ -109,7 +109,7 @@
for (size_t i = 0; i < __arraycount(tst); i++) {
sin.sin_addr = tst[i].ia;
- sin.sin_port = htons(i);
+ sin.sin_port = (in_port_t)htons(i);
r = sin_print(buf, l, &sin);
if (i == 0)
e = snprintf(res, sizeof(res), "%s", tst[i].str);
@@ -123,7 +123,7 @@
l = 14;
for (size_t i = 0; i < __arraycount(tst); i++) {
sin.sin_addr = tst[i].ia;
- sin.sin_port = htons(i);
+ sin.sin_port = (in_port_t)htons(i);
r = sin_print(buf, l, &sin);
if (i == 0)
e = snprintf(res, l, "%s", tst[i].str);
diff -r 37fdb1301307 -r acd309dbf9d6 tests/sys/netinet6/t_print.c
--- a/tests/sys/netinet6/t_print.c Wed Dec 03 08:14:26 2014 +0000
+++ b/tests/sys/netinet6/t_print.c Wed Dec 03 13:10:49 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $ */
+/* $NetBSD: t_print.c,v 1.2 2014/12/03 13:10:49 christos Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $");
+__RCSID("$NetBSD: t_print.c,v 1.2 2014/12/03 13:10:49 christos Exp $");
#include "netinet6/in6_print.c"
#include "netinet/in_print.c"
@@ -118,7 +118,7 @@
for (size_t i = 0; i < __arraycount(tst); i++) {
sin6.sin6_addr = tst[i].ia;
- sin6.sin6_port = htons(i);
+ sin6.sin6_port = (in_port_t)htons(i);
r = sin6_print(buf, l, &sin6);
if (i == 0)
e = snprintf(res, sizeof(res), "%s", tst[i].str);
@@ -133,7 +133,7 @@
l = 14;
for (size_t i = 0; i < __arraycount(tst); i++) {
sin6.sin6_addr = tst[i].ia;
- sin6.sin6_port = htons(i);
+ sin6.sin6_port = (in_port_t)htons(i);
r = sin6_print(buf, l, &sin6);
if (i == 0)
e = snprintf(res, l, "%s", tst[i].str);
Home |
Main Index |
Thread Index |
Old Index