1
0
Fork 0
forked from len0rd/rockbox

Remove buflib allocation names, part two

Remove allocation names from the buflib API and fix up all callers.

Change-Id: I3df922e258d5f0d711d70e72b56b4ed634fb0f5a
This commit is contained in:
Aidan MacDonald 2022-10-15 23:55:39 +01:00
parent 3301c5aa6d
commit 1e9ad3ca0d
39 changed files with 69 additions and 115 deletions

View file

@ -2020,7 +2020,7 @@ static void alloc_namebuffer(void)
static int alloc_tempbuf(size_t* buflen)
{
/* request a reasonable size first */
int handle = core_alloc_ex(NULL, PLAYLIST_LOAD_BUFLEN, &buflib_ops_locked);
int handle = core_alloc_ex(PLAYLIST_LOAD_BUFLEN, &buflib_ops_locked);
if (handle > 0)
{
*buflen = PLAYLIST_LOAD_BUFLEN;
@ -2028,7 +2028,7 @@ static int alloc_tempbuf(size_t* buflen)
}
/* otherwise, try being unreasonable */
return core_alloc_maximum(NULL, buflen, &buflib_ops_locked);
return core_alloc_maximum(buflen, &buflib_ops_locked);
}
/*
@ -2075,15 +2075,14 @@ void playlist_init(void)
playlist->fd = -1;
playlist->control_fd = -1;
playlist->max_playlist_size = global_settings.max_files_in_playlist;
handle = core_alloc_ex("playlist idx",
playlist->max_playlist_size * sizeof(*playlist->indices), &ops);
handle = core_alloc_ex(playlist->max_playlist_size * sizeof(*playlist->indices), &ops);
playlist->indices = core_get_data(handle);
initalize_new_playlist(playlist, true);
#ifdef HAVE_DIRCACHE
handle = core_alloc_ex("playlist dc",
handle = core_alloc_ex(
playlist->max_playlist_size * sizeof(*playlist->dcfrefs), &ops);
playlist->dcfrefs = core_get_data(handle);
dc_copy_filerefs(playlist->dcfrefs, NULL, playlist->max_playlist_size);