fix shadow var warning
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 8 Dec 2011 04:18:12 +0000 (04:18 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 8 Dec 2011 04:18:12 +0000 (04:18 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@66014 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/mp/buddy/eina_buddy.c

index f402c6f..b6af521 100644 (file)
@@ -133,23 +133,23 @@ static void _free(void *data, void *element)
    Buddy *b = data;
    Block *block, *buddy;
    size_t offset;
-   size_t index;
+   size_t idx;
 
    offset = (unsigned char *)element - (unsigned char *)b->heap;
    if (offset > b->size)
       return;
 
-   index = offset >> b->min_order;
-   block = &b->blocks[index];
+   idx = offset >> b->min_order;
+   block = &b->blocks[idx];
 
-   //printf("free %x index = %d order = %d buddy = %d\n", offset, index, block->order, index ^ (1 << block->order));
+   //printf("free %x idx = %d order = %d buddy = %d\n", offset, idx, block->order, idx ^ (1 << block->order));
    /* we should always work with the buddy at right */
-   if (index & (1 << block->order))
+   if (idx & (1 << block->order))
      {
         Block *left;
 
-        index = index ^ (1 << block->order);
-        left = &b->blocks[index];
+        idx = idx ^ (1 << block->order);
+        left = &b->blocks[idx];
         if (!left->available)
            goto end;
         else
@@ -170,7 +170,7 @@ check:
 
      }
 
-   buddy = &b->blocks[index ^ (1 << block->order)];
+   buddy = &b->blocks[idx ^ (1 << block->order)];
    if (!buddy->available)
      {
         goto end; /* merge two blocks */