2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

u_int32_t -> isc_uin32_t

This commit is contained in:
Mark Andrews
2002-10-28 02:23:54 +00:00
parent a3bcfd4660
commit e12b02b62c
3 changed files with 10 additions and 10 deletions

View File

@@ -17,7 +17,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] =
"$Id: netscope.c,v 1.2 2002/10/24 03:52:33 marka Exp $";
"$Id: netscope.c,v 1.3 2002/10/28 02:23:53 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <isc/string.h>
@@ -26,11 +26,11 @@ static char rcsid[] =
#include <isc/result.h>
isc_result_t
isc_netscope_pton(int af, char *scopename, char *addr, u_int32_t *zoneid) {
isc_netscope_pton(int af, char *scopename, char *addr, isc_uint32_t *zoneid) {
char *ep;
unsigned int ifid;
struct in6_addr *in6;
u_int32_t zone;
isc_uint32_t zone;
isc_uint64_t llz;
/* at this moment, we only support AF_INET6 */
@@ -49,14 +49,14 @@ isc_netscope_pton(int af, char *scopename, char *addr, u_int32_t *zoneid) {
*/
if (IN6_IS_ADDR_LINKLOCAL(in6) &&
(ifid = if_nametoindex((const char *)scopename)) != 0)
zone = (u_int32_t)ifid;
zone = (isc_uint32_t)ifid;
else {
llz = isc_string_touint64(scopename, &ep, 10);
if (ep == scopename)
return (ISC_R_FAILURE);
/* check overflow */
zone = (u_int32_t)(llz & 0xffffffffUL);
zone = (isc_uint32_t)(llz & 0xffffffffUL);
if (zone != llz)
return (ISC_R_FAILURE);
}