1
0
Fork 0
forked from len0rd/rockbox

fix: when move_handle() is successful, the return value

corrects valid type.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26249 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Yoshihisa Uchida 2010-05-24 10:49:36 +00:00
parent ff6b0425e4
commit 9c13b6e7c6

View file

@ -424,11 +424,11 @@ static struct memory_handle *find_handle(int handle_id)
delta maximum bytes available to move the handle. If the move is performed
it is set to the actual distance moved.
data_size is the amount of data to move along with the struct.
returns a valid memory_handle if the move is successful
NULL if the handle is NULL, the move would be less than the size of
a memory_handle after correcting for wraps or if the handle is not
found in the linked list for adjustment. This function has no side
effects if NULL is returned. */
returns true if the move is successful and false if the handle is NULL,
the move would be less than the size of a memory_handle after
correcting for wraps or if the handle is not found in the linked
list for adjustment. This function has no side effects if false
is returned. */
static bool move_handle(struct memory_handle **h, size_t *delta,
size_t data_size, bool can_wrap)
{
@ -552,7 +552,7 @@ static bool move_handle(struct memory_handle **h, size_t *delta,
*delta = final_delta;
mutex_unlock(&llist_mod_mutex);
mutex_unlock(&llist_mutex);
return dest;
return true;
}