diff options
author | William Wilgus <wilgus.william@gmail.com> | 2023-10-03 21:54:19 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2023-10-03 21:54:19 -0400 |
commit | 6634a60bf0750159ffc34bdff548fac0817e72bc (patch) | |
tree | f91cd7b74cb518c57735ce22cb668f2737cb3fc7 /apps/tagtree.c | |
parent | eee48dca39cbbe3cf4ad13bcf1d90bb3492151e5 (diff) | |
download | rockbox-6634a60bf0750159ffc34bdff548fac0817e72bc.tar.gz rockbox-6634a60bf0750159ffc34bdff548fac0817e72bc.zip |
tagcache/tagtree remove static buffer from tagcache_get_next
callers can supply their own buffer
Change-Id: I8996ecfb88e30926296a0cb0563cf6c46977323e
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r-- | apps/tagtree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c index 78bf6bf255..542b0bb120 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -1448,6 +1448,8 @@ static void tcs_get_basename(struct tagcache_search *tcs, bool is_basename) | |||
1448 | 1448 | ||
1449 | static int retrieve_entries(struct tree_context *c, int offset, bool init) | 1449 | static int retrieve_entries(struct tree_context *c, int offset, bool init) |
1450 | { | 1450 | { |
1451 | char tcs_buf[TAGCACHE_BUFSZ]; | ||
1452 | const long tcs_bufsz = sizeof(tcs_buf); | ||
1451 | struct tagcache_search tcs; | 1453 | struct tagcache_search tcs; |
1452 | struct display_format *fmt; | 1454 | struct display_format *fmt; |
1453 | int i; | 1455 | int i; |
@@ -1584,7 +1586,7 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) | |||
1584 | total_count += 2; | 1586 | total_count += 2; |
1585 | } | 1587 | } |
1586 | 1588 | ||
1587 | while (tagcache_get_next(&tcs)) | 1589 | while (tagcache_get_next(&tcs, tcs_buf, tcs_bufsz)) |
1588 | { | 1590 | { |
1589 | if (total_count++ < offset) | 1591 | if (total_count++ < offset) |
1590 | continue; | 1592 | continue; |
@@ -1729,7 +1731,7 @@ entry_skip_formatter: | |||
1729 | return current_entry_count; | 1731 | return current_entry_count; |
1730 | } | 1732 | } |
1731 | 1733 | ||
1732 | while (tagcache_get_next(&tcs)) | 1734 | while (tagcache_get_next(&tcs, tcs_buf, tcs_bufsz)) |
1733 | { | 1735 | { |
1734 | if (!show_search_progress(false, total_count)) | 1736 | if (!show_search_progress(false, total_count)) |
1735 | break; | 1737 | break; |