From 53f9e72e180e3d9c57b105cf2d0ecbc6730636fa Mon Sep 17 00:00:00 2001 From: Georg Reinke Date: Tue, 28 Mar 2017 13:31:55 +0200 Subject: [PATCH] Revert "fix IS_ALIGNED macro" This reverts commit 07a3b4db789ec6fe0c4773b9199b268280abc4a3. --- include/villas/utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/villas/utils.h b/include/villas/utils.h index 03e6ae686..9df8b9ba9 100644 --- a/include/villas/utils.h +++ b/include/villas/utils.h @@ -51,7 +51,7 @@ #define ALIGN(x, a) ALIGN_MASK(x, (uintptr_t) (a) - 1) #define ALIGN_MASK(x, m) (((uintptr_t) (x) + (m)) & ~(m)) -#define IS_ALIGNED(x, a) ((uintptr_t) (x) % (uintptr_t) (a) == 0) +#define IS_ALIGNED(x, a) (ALIGN(x, a) == (uintptr_t) x) /** Round-up integer division */ #define CEIL(x, y) (((x) + (y) - 1) / (y)) @@ -228,4 +228,4 @@ static inline int log2i(long long x) { /** Sleep with rdtsc */ void rdtsc_sleep(uint64_t nanosecs, uint64_t start); -#endif /* _UTILS_H_ */ +#endif /* _UTILS_H_ */ \ No newline at end of file