avoid dereferencing void** to remove warnings when building with -Os

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26733 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-06-10 02:26:09 +00:00
parent fc94a92ad1
commit 0ae6f70fdd

View file

@ -159,10 +159,9 @@ static void timeout_tick(void)
void timeout_cancel(struct timeout *tmo) void timeout_cancel(struct timeout *tmo)
{ {
int oldlevel = disable_irq_save(); int oldlevel = disable_irq_save();
void **arr = (void **)tmo_list; int rc = remove_array_ptr((void **)tmo_list, tmo);
int rc = remove_array_ptr(arr, tmo);
if(rc >= 0 && *arr == NULL) if(rc >= 0 && *tmo_list == NULL)
{ {
tick_remove_task(timeout_tick); /* Last one - remove task */ tick_remove_task(timeout_tick); /* Last one - remove task */
} }
@ -193,7 +192,7 @@ void timeout_register(struct timeout *tmo, timeout_cb_type callback,
if(*p == NULL) if(*p == NULL)
{ {
/* Not present */ /* Not present */
if(*arr == NULL) if(*tmo_list == NULL)
{ {
tick_add_task(timeout_tick); /* First one - add task */ tick_add_task(timeout_tick); /* First one - add task */
} }