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 /firmware/common | |
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 'firmware/common')
-rw-r--r-- | firmware/common/dircache.c | 2 | ||||
-rw-r--r-- | firmware/common/unicode.c | 8 | ||||
-rw-r--r-- | firmware/common/zip.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index 5902f8b3fd..41564194d0 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c | |||
@@ -479,7 +479,7 @@ static void binding_dissolve_volume(struct dircache_runinfo_volume *dcrivolp) | |||
479 | static int alloc_cache(size_t size) | 479 | static int alloc_cache(size_t size) |
480 | { | 480 | { |
481 | /* pad with one extra-- see alloc_name() and free_name() */ | 481 | /* pad with one extra-- see alloc_name() and free_name() */ |
482 | return core_alloc_ex("dircache", size + 1, &dircache_runinfo.ops); | 482 | return core_alloc_ex(size + 1, &dircache_runinfo.ops); |
483 | } | 483 | } |
484 | 484 | ||
485 | /** | 485 | /** |
diff --git a/firmware/common/unicode.c b/firmware/common/unicode.c index e53ad6bcb0..1ed2e5e49d 100644 --- a/firmware/common/unicode.c +++ b/firmware/common/unicode.c | |||
@@ -166,15 +166,15 @@ static unsigned short default_cp_table_buf[MAX_CP_TABLE_SIZE+1]; | |||
166 | default_cp_table_buf | 166 | default_cp_table_buf |
167 | #define cp_table_free(handle) \ | 167 | #define cp_table_free(handle) \ |
168 | do {} while (0) | 168 | do {} while (0) |
169 | #define cp_table_alloc(filename, size, opsp) \ | 169 | #define cp_table_alloc(size, opsp) \ |
170 | ({ (void)(opsp); 1; }) | 170 | ({ (void)(opsp); 1; }) |
171 | #define cp_table_pin(handle) \ | 171 | #define cp_table_pin(handle) \ |
172 | do { (void)handle; } while(0) | 172 | do { (void)handle; } while(0) |
173 | #define cp_table_unpin(handle) \ | 173 | #define cp_table_unpin(handle) \ |
174 | do { (void)handle; } while(0) | 174 | do { (void)handle; } while(0) |
175 | #else | 175 | #else |
176 | #define cp_table_alloc(filename, size, opsp) \ | 176 | #define cp_table_alloc(size, opsp) \ |
177 | core_alloc_ex((filename), (size), (opsp)) | 177 | core_alloc_ex((size), (opsp)) |
178 | #define cp_table_free(handle) \ | 178 | #define cp_table_free(handle) \ |
179 | core_free(handle) | 179 | core_free(handle) |
180 | #define cp_table_get_data(handle) \ | 180 | #define cp_table_get_data(handle) \ |
@@ -223,7 +223,7 @@ static int alloc_and_load_cp_table(int cp, void *buf) | |||
223 | !(size % (off_t)sizeof (uint16_t))) { | 223 | !(size % (off_t)sizeof (uint16_t))) { |
224 | 224 | ||
225 | /* if the buffer is provided, use that but don't alloc */ | 225 | /* if the buffer is provided, use that but don't alloc */ |
226 | int handle = buf ? 0 : cp_table_alloc(filename, size, NULL); | 226 | int handle = buf ? 0 : cp_table_alloc(size, NULL); |
227 | if (handle > 0) { | 227 | if (handle > 0) { |
228 | cp_table_pin(handle); | 228 | cp_table_pin(handle); |
229 | buf = cp_table_get_data(handle); | 229 | buf = cp_table_get_data(handle); |
diff --git a/firmware/common/zip.c b/firmware/common/zip.c index 6d250abb58..2d560e472e 100644 --- a/firmware/common/zip.c +++ b/firmware/common/zip.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "crc32.h" | 31 | #include "crc32.h" |
32 | #include "rbendian.h" | 32 | #include "rbendian.h" |
33 | 33 | ||
34 | #define zip_core_alloc(N) core_alloc_ex("zip",(N),&buflib_ops_locked) | 34 | #define zip_core_alloc(N) core_alloc_ex((N),&buflib_ops_locked) |
35 | 35 | ||
36 | enum { | 36 | enum { |
37 | ZIP_SIG_ED = 0x06054b50, | 37 | ZIP_SIG_ED = 0x06054b50, |