summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlexander Levin <al.le@rockbox.org>2010-11-05 22:10:42 +0000
committerAlexander Levin <al.le@rockbox.org>2010-11-05 22:10:42 +0000
commitde56a2284a4945db8f3379f655343da9c40fd7f9 (patch)
treee920f233d0a1f0abd72f26e26b64852f387caea2 /lib
parentc044117c5f72af93d680780c60fc93b8776449b0 (diff)
downloadrockbox-de56a2284a4945db8f3379f655343da9c40fd7f9.tar.gz
rockbox-de56a2284a4945db8f3379f655343da9c40fd7f9.tar.bz2
rockbox-de56a2284a4945db8f3379f655343da9c40fd7f9.zip
More concrete names for the head and the tail of the linked list (no functional changes)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28501 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'lib')
-rw-r--r--lib/skin_parser/skin_buffer.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/skin_parser/skin_buffer.c b/lib/skin_parser/skin_buffer.c
index 0045b3c4c7..3c0870ea5a 100644
--- a/lib/skin_parser/skin_buffer.c
+++ b/lib/skin_parser/skin_buffer.c
@@ -66,11 +66,12 @@ struct malloc_object {
void* object;
struct malloc_object *next;
};
-static struct malloc_object *first = NULL, *last = NULL;
+static struct malloc_object *malloced_head = NULL, *malloced_tail = NULL;
static void skin_free_malloced(void)
{
- struct malloc_object *obj = first, *this;
+ struct malloc_object *obj = malloced_head;
+ struct malloc_object *this;
while (obj)
{
this = obj;
@@ -78,8 +79,8 @@ static void skin_free_malloced(void)
free(this->object);
free(this);
}
- first = NULL;
- last = NULL;
+ malloced_head = NULL;
+ malloced_tail = NULL;
}
#endif
@@ -91,7 +92,7 @@ void skin_buffer_init(char* buffer, size_t size)
buf_size = size;
#elif defined(USE_HOST_MALLOC)
(void)buffer; (void)size;
- skin_free_malloced();
+ skin_free_malloced();
#endif
}
@@ -112,11 +113,11 @@ void* skin_buffer_alloc(size_t size)
return NULL;
obj->object = malloc(size);
obj->next = NULL;
- if (last == NULL)
- first = last = obj;
+ if (malloced_tail == NULL)
+ malloced_head = malloced_tail = obj;
else
- last->next = obj;
- last = obj;
+ malloced_tail->next = obj;
+ malloced_tail = obj;
retval = obj->object;
#else
retval = malloc(size);