mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-06-02 01:51:41 +00:00
enforce coding style guide
using astyle
This commit is contained in:
parent
90c2d76709
commit
9382edabd5
129 changed files with 33394 additions and 27137 deletions
|
@ -8,24 +8,24 @@ int main(void)
|
|||
{
|
||||
unsigned int align;
|
||||
uintptr_t ptr, aligned_ptr;
|
||||
|
||||
for(align = 32; align <= 4*1024u; align <<= 1)
|
||||
|
||||
for(align = 32; align <= 4 * 1024u; align <<= 1)
|
||||
{
|
||||
for(ptr = 0; ptr <= (align<<10); ptr++)
|
||||
for(ptr = 0; ptr <= (align << 10); ptr++)
|
||||
{
|
||||
char* tmp = fluid_align_ptr((char*)ptr, align);
|
||||
char *tmp = fluid_align_ptr((char *)ptr, align);
|
||||
aligned_ptr = (uintptr_t)tmp;
|
||||
|
||||
|
||||
// pointer must be aligned properly
|
||||
TEST_ASSERT(aligned_ptr % align == 0);
|
||||
|
||||
|
||||
// aligned pointer must not be smaller than ptr
|
||||
TEST_ASSERT(aligned_ptr >= ptr);
|
||||
|
||||
|
||||
// aligned pointer must not be bigger than alignment
|
||||
TEST_ASSERT(aligned_ptr < ptr + align);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue