Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/dhcpcd/dist cast htons() args.
details: https://anonhg.NetBSD.org/src/rev/83e6b07ba779
branches: trunk
changeset: 336929:83e6b07ba779
user: christos <christos%NetBSD.org@localhost>
date: Fri Mar 27 18:51:08 2015 +0000
description:
cast htons() args.
diffstat:
external/bsd/dhcpcd/dist/if-bsd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 08fb9f72e646 -r 83e6b07ba779 external/bsd/dhcpcd/dist/if-bsd.c
--- a/external/bsd/dhcpcd/dist/if-bsd.c Fri Mar 27 17:56:16 2015 +0000
+++ b/external/bsd/dhcpcd/dist/if-bsd.c Fri Mar 27 18:51:08 2015 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: if-bsd.c,v 1.18 2015/03/26 10:26:37 roy Exp $");
+ __RCSID("$NetBSD: if-bsd.c,v 1.19 2015/03/27 18:51:08 christos Exp $");
/*
* dhcpcd - DHCP client daemon
@@ -388,7 +388,7 @@
memset(&hw, 0, ETHER_HDR_LEN);
memset(&hw.ether_dhost, 0xff, ETHER_ADDR_LEN);
- hw.ether_type = htons(protocol);
+ hw.ether_type = htons((uint16_t)protocol);
iov[0].iov_base = &hw;
iov[0].iov_len = ETHER_HDR_LEN;
iov[1].iov_base = UNCONST(data);
@@ -728,7 +728,7 @@
/* KAME based systems want to store the scope inside the sin6_addr
* for link local addreses */
if (IN6_IS_ADDR_LINKLOCAL(&sin->sin6_addr)) {
- uint16_t scope = htons(ifindex);
+ uint16_t scope = htons((uint16_t)ifindex);
memcpy(&sin->sin6_addr.s6_addr[2], &scope,
sizeof(scope));
}
Home |
Main Index |
Thread Index |
Old Index