diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-15 23:55:39 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2023-01-13 10:32:54 +0000 |
commit | 1e9ad3ca0d9bf3e917eb2beb460421155144760a (patch) | |
tree | 752590b42f338f03223e024fc5b642ac9a8a5598 /apps/playlist.c | |
parent | 3301c5aa6db76832dbb9af8f72d29b348190fd91 (diff) | |
download | rockbox-1e9ad3ca0d9bf3e917eb2beb460421155144760a.tar.gz rockbox-1e9ad3ca0d9bf3e917eb2beb460421155144760a.zip |
Remove buflib allocation names, part two
Remove allocation names from the buflib API and fix up all callers.
Change-Id: I3df922e258d5f0d711d70e72b56b4ed634fb0f5a
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 25bd60dd2a..481524b9d4 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -2020,7 +2020,7 @@ static void alloc_namebuffer(void) | |||
2020 | static int alloc_tempbuf(size_t* buflen) | 2020 | static int alloc_tempbuf(size_t* buflen) |
2021 | { | 2021 | { |
2022 | /* request a reasonable size first */ | 2022 | /* request a reasonable size first */ |
2023 | int handle = core_alloc_ex(NULL, PLAYLIST_LOAD_BUFLEN, &buflib_ops_locked); | 2023 | int handle = core_alloc_ex(PLAYLIST_LOAD_BUFLEN, &buflib_ops_locked); |
2024 | if (handle > 0) | 2024 | if (handle > 0) |
2025 | { | 2025 | { |
2026 | *buflen = PLAYLIST_LOAD_BUFLEN; | 2026 | *buflen = PLAYLIST_LOAD_BUFLEN; |
@@ -2028,7 +2028,7 @@ static int alloc_tempbuf(size_t* buflen) | |||
2028 | } | 2028 | } |
2029 | 2029 | ||
2030 | /* otherwise, try being unreasonable */ | 2030 | /* otherwise, try being unreasonable */ |
2031 | return core_alloc_maximum(NULL, buflen, &buflib_ops_locked); | 2031 | return core_alloc_maximum(buflen, &buflib_ops_locked); |
2032 | } | 2032 | } |
2033 | 2033 | ||
2034 | /* | 2034 | /* |
@@ -2075,15 +2075,14 @@ void playlist_init(void) | |||
2075 | playlist->fd = -1; | 2075 | playlist->fd = -1; |
2076 | playlist->control_fd = -1; | 2076 | playlist->control_fd = -1; |
2077 | playlist->max_playlist_size = global_settings.max_files_in_playlist; | 2077 | playlist->max_playlist_size = global_settings.max_files_in_playlist; |
2078 | handle = core_alloc_ex("playlist idx", | ||
2079 | playlist->max_playlist_size * sizeof(*playlist->indices), &ops); | ||
2080 | 2078 | ||
2079 | handle = core_alloc_ex(playlist->max_playlist_size * sizeof(*playlist->indices), &ops); | ||
2081 | playlist->indices = core_get_data(handle); | 2080 | playlist->indices = core_get_data(handle); |
2082 | 2081 | ||
2083 | initalize_new_playlist(playlist, true); | 2082 | initalize_new_playlist(playlist, true); |
2084 | 2083 | ||
2085 | #ifdef HAVE_DIRCACHE | 2084 | #ifdef HAVE_DIRCACHE |
2086 | handle = core_alloc_ex("playlist dc", | 2085 | handle = core_alloc_ex( |
2087 | playlist->max_playlist_size * sizeof(*playlist->dcfrefs), &ops); | 2086 | playlist->max_playlist_size * sizeof(*playlist->dcfrefs), &ops); |
2088 | playlist->dcfrefs = core_get_data(handle); | 2087 | playlist->dcfrefs = core_get_data(handle); |
2089 | dc_copy_filerefs(playlist->dcfrefs, NULL, playlist->max_playlist_size); | 2088 | dc_copy_filerefs(playlist->dcfrefs, NULL, playlist->max_playlist_size); |