Changeset 93e3b341 in rtems


Ignore:
Timestamp:
Jan 14, 2019, 6:50:26 AM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
b5bdecf
Parents:
12dfe5dc
git-author:
Sebastian Huber <sebastian.huber@…> (01/14/19 06:50:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/18/19 10:49:09)
Message:

score: Simplify _Addresses_Is_aligned()

The CPU_ALIGNMENT must not be zero, this is also checked via a static
assertion. Fix formatting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/score/address.h

    r12dfe5dc r93e3b341  
    108108 * @retval false The @a address is not aligned.
    109109 */
    110 RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned (
     110RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned(
    111111  const void *address
    112112)
    113113{
    114 #if (CPU_ALIGNMENT == 0)
    115     return true;
    116 #else
    117     return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
    118 #endif
     114  return ( (uintptr_t) address % CPU_ALIGNMENT ) == 0;
    119115}
    120116
Note: See TracChangeset for help on using the changeset viewer.