summaryrefslogtreecommitdiffstats
path: root/source/lib/interface.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-08-14 15:02:28 +0000
committerAndrew Tridgell <tridge@samba.org>1996-08-14 15:02:28 +0000
commitb4aaec504ae66dc6a0f05d12529100cb62d47afd (patch)
treefc5080ac49a976778194510378053d72270800a3 /source/lib/interface.c
parent9735d7e8e2978ce17a001d7d5766faf382ff5788 (diff)
downloadsamba-b4aaec504ae66dc6a0f05d12529100cb62d47afd.tar.gz
samba-b4aaec504ae66dc6a0f05d12529100cb62d47afd.tar.xz
samba-b4aaec504ae66dc6a0f05d12529100cb62d47afd.zip
changed "unsigned long" to "uint32" in several places (for IP
addresses) to keep 64 bit machines happy.
Diffstat (limited to 'source/lib/interface.c')
-rw-r--r--source/lib/interface.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/lib/interface.c b/source/lib/interface.c
index 061ac08c7b4..59a542ca0e2 100644
--- a/source/lib/interface.c
+++ b/source/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);
}