From ebc96b7309dbce110ae63bcb91dd8ad5a2cadbbf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 14 Aug 1996 15:02:28 +0000 Subject: changed "unsigned long" to "uint32" in several places (for IP addresses) to keep 64 bit machines happy. (This used to be commit b4aaec504ae66dc6a0f05d12529100cb62d47afd) --- source3/lib/interface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/lib/interface.c') diff --git a/source3/lib/interface.c b/source3/lib/interface.c index 061ac08c7b..59a542ca0e 100644 --- a/source3/lib/interface.c +++ b/source3/lib/interface.c @@ -41,8 +41,8 @@ calculate the default netmask for an address ****************************************************************************/ static void default_netmask(struct in_addr *inm, struct in_addr *iad) { - unsigned long ad = ntohl(iad->s_addr); - unsigned long nm; + uint32 ad = ntohl(iad->s_addr); + uint32 nm; /* ** Guess a netmask based on the class of the IP address given. */ @@ -227,7 +227,7 @@ static void get_broadcast(struct in_addr *if_ipaddr, /* sanity check on the netmask */ { - unsigned long nm = ntohl(if_nmask->s_addr); + uint32 nm = ntohl(if_nmask->s_addr); if ((nm >> 24) != 0xFF) { DEBUG(0,("Impossible netmask %s - using defaults\n",inet_ntoa(*if_nmask))); default_netmask(if_nmask, if_ipaddr); @@ -238,9 +238,9 @@ static void get_broadcast(struct in_addr *if_ipaddr, all MS operating systems do, we have to comply even if the unix box is setup differently */ { - unsigned long ad = ntohl(if_ipaddr->s_addr); - unsigned long nm = ntohl(if_nmask->s_addr); - unsigned long bc = (ad & nm) | (0xffffffff & ~nm); + uint32 ad = ntohl(if_ipaddr->s_addr); + uint32 nm = ntohl(if_nmask->s_addr); + uint32 bc = (ad & nm) | (0xffffffff & ~nm); if_bcast->s_addr = htonl(bc); } -- cgit