summaryrefslogtreecommitdiff
path: root/utils/IdTable.cc
diff options
context:
space:
mode:
Diffstat (limited to 'utils/IdTable.cc')
-rw-r--r--utils/IdTable.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/IdTable.cc b/utils/IdTable.cc
index bfca17a..193973c 100644
--- a/utils/IdTable.cc
+++ b/utils/IdTable.cc
@@ -89,7 +89,8 @@ CcuIdTable :: CcuIdTable (int sz)
// link free entries with the 'Type' field
int i = 0;
- for (CcuIdCell* p = Entries; p < LastCell; p++)
+ CcuIdCell* p;
+ for (p = Entries; p < LastCell; p++)
p->Type = ++i;
(--p)->Type = 0; // end of free list
@@ -123,7 +124,8 @@ CcuIdTable :: Grow (int newNb)
// link free entries with the 'Type' field
int i = nb;
- for (CcuIdCell* p = Entries + nb; p < LastCell; p++)
+ CcuIdCell* p;
+ for (p = Entries + nb; p < LastCell; p++)
p->Type = ++i;
// prepend to current free list (to use them first)
(--p)->Type = FirstFree;