mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Fix size_t handling in plugin_get_buffer()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25884 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6027b91603
commit
8d4ff638b9
14 changed files with 42 additions and 36 deletions
|
@ -1141,6 +1141,7 @@ int main(const void* parameter)
|
|||
#ifdef DEBUG
|
||||
int button;
|
||||
#endif
|
||||
size_t buf_size;
|
||||
ssize_t stacksize;
|
||||
void* stack;
|
||||
|
||||
|
@ -1155,7 +1156,8 @@ int main(const void* parameter)
|
|||
#endif
|
||||
|
||||
/* init the worker thread */
|
||||
stack = rb->plugin_get_buffer((size_t *)&stacksize); /* use the rest as stack */
|
||||
stack = rb->plugin_get_buffer(&buf_size); /* use the rest as stack */
|
||||
stacksize = buf_size;
|
||||
stack = (void*)(((unsigned int)stack + 100) & ~3); /* a bit away, 32 bit align */
|
||||
stacksize = (stacksize - 100) & ~3;
|
||||
if (stacksize < DEFAULT_STACK_SIZE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue