From 6cb978478120614f0f9df21a08a3be9decc89435 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Mon, 5 May 2003 17:13:25 +0000 Subject: [PATCH] ubik-dont-copy-stack-garbage-when-netinfo-forces-primary-address-change-20030505 don't mess up count by reusing it --- src/ubik/beacon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ubik/beacon.c b/src/ubik/beacon.c index b9cea2aae..6d7800a8d 100644 --- a/src/ubik/beacon.c +++ b/src/ubik/beacon.c @@ -461,7 +461,7 @@ static verifyInterfaceAddress(ame, info, aservers) { afs_uint32 myAddr[UBIK_MAX_INTERFACE_ADDR], *servList, tmpAddr; afs_uint32 myAddr2[UBIK_MAX_INTERFACE_ADDR]; - int count, found, i, j, totalServers, start, end, usednetfiles = 0; + int tcount, count, found, i, j, totalServers, start, end, usednetfiles = 0; if (info) totalServers = info->numServers; @@ -525,15 +525,15 @@ static verifyInterfaceAddress(ame, info, aservers) if (usednetfiles) { /* take the address we did get, then see if ame was masked */ *ame=myAddr[0]; - count = rx_getAllAddr(myAddr2, UBIK_MAX_INTERFACE_ADDR); - if ( count <= 0 ) /* no address found */ + tcount = rx_getAllAddr(myAddr2, UBIK_MAX_INTERFACE_ADDR); + if ( tcount <= 0 ) /* no address found */ { ubik_print("ubik: No network addresses found, aborting.."); return UBADHOST; } /* verify that the My-address passed in by ubik is correct */ - for ( j=0, found = 0; j < count; j++) + for ( j=0, found = 0; j < tcount; j++) { if ( *ame == myAddr2[j] ) /* both in net byte order */ { -- 2.39.5