rename a local variable from free to myfree
This commit is contained in:
parent
8ff8b7b272
commit
215f2c6a8b
|
@ -57,18 +57,18 @@ set_t *setInit(void)
|
|||
|
||||
int setAdd(set_t * set, ITEM_TYPE item)
|
||||
{
|
||||
int free = set->free;
|
||||
int myfree = set->free;
|
||||
|
||||
if (free != -1) {
|
||||
set->list[free].val = item;
|
||||
set->free = set->list[free].free_next;
|
||||
if (myfree != -1) {
|
||||
set->list[myfree].val = item;
|
||||
set->free = set->list[myfree].free_next;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
set->list[free].alloc_next = set->alloc;
|
||||
set->alloc = free;
|
||||
set->list[free].free_next = -1;
|
||||
set->list[myfree].alloc_next = set->alloc;
|
||||
set->alloc = myfree;
|
||||
set->list[myfree].free_next = -1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue