mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Buffering should align itself and not rely on buffering_reset parameters when storage alignment matters so that wrapped reads maintain alignment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29258 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
19ea72ff63
commit
0d902c8c54
2 changed files with 8 additions and 0 deletions
|
@ -1572,6 +1572,11 @@ void buffering_init(void)
|
|||
/* Initialise the buffering subsystem */
|
||||
bool buffering_reset(char *buf, size_t buflen)
|
||||
{
|
||||
/* Wraps of storage-aligned data must also be storage aligned,
|
||||
thus buf and buflen must be a aligned to an integer multiple of
|
||||
the storage alignment */
|
||||
STORAGE_ALIGN_BUFFER(buf, buflen);
|
||||
|
||||
if (!buf || !buflen)
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue