score: Simplify _Addresses_Is_aligned()

The CPU_ALIGNMENT must not be zero, this is also checked via a static
assertion.  Fix formatting.
This commit is contained in:
Sebastian Huber
2019-01-14 07:50:26 +01:00
parent 12dfe5dcb1
commit 93e3b34161

View File

@@ -107,15 +107,11 @@ RTEMS_INLINE_ROUTINE intptr_t _Addresses_Subtract(
* @retval true The @a address is aligned.
* @retval false The @a address is not aligned.
*/
RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned (
RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned(
const void *address
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
#endif
return ( (uintptr_t) address % CPU_ALIGNMENT ) == 0;
}
/**