From 93e3b3416131acd566000094d3cf81b7a1e11f69 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 14 Jan 2019 07:50:26 +0100 Subject: score: Simplify _Addresses_Is_aligned() The CPU_ALIGNMENT must not be zero, this is also checked via a static assertion. Fix formatting. --- cpukit/include/rtems/score/address.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cpukit/include/rtems/score/address.h b/cpukit/include/rtems/score/address.h index fb88230d18..00fc105e48 100644 --- a/cpukit/include/rtems/score/address.h +++ b/cpukit/include/rtems/score/address.h @@ -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; } /** -- cgit v1.2.3