From ae3e679ab0163560a29ca51eec77a2c897a8f216 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 21 Aug 2002 06:52:18 +0000 Subject: [PATCH] realcellindex-fix-allocation-20020821 fix comparison and the double allocation it uncovers --- src/afs/afs_cell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afs/afs_cell.c b/src/afs/afs_cell.c index 7b3a42e77..f1993536d 100644 --- a/src/afs/afs_cell.c +++ b/src/afs/afs_cell.c @@ -512,7 +512,7 @@ afs_int32 afs_NewCell(acellName, acellHosts, aflags, linkedcname, fsport, vlport tc->vlport = (vlport ? vlport : AFS_VLPORT); afs_stats_cmperf.numCellsVisible++; newc++; - if (!aflags & CAlias) { + if (!(aflags & CAlias)) { tc->realcellIndex = afs_realcellindex++; } else { tc->realcellIndex = -1; @@ -546,7 +546,7 @@ afs_int32 afs_NewCell(acellName, acellHosts, aflags, linkedcname, fsport, vlport tc->timeout = timeout; /* Allow converting an alias into a real cell */ - if (!(aflags & CAlias)) { + if ((!(aflags & CAlias)) && (tc->states & CAlias)) { tc->states &= ~CAlias; tc->realcellIndex = afs_realcellindex++; } -- 2.39.5