diff options
author | Yabin Cui <yabinc@google.com> | 2016-06-15 11:49:23 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2016-06-15 14:28:28 -0700 |
commit | a7a0e5076f0107173bc9ee067d13955d0d169f25 (patch) | |
tree | c7893af65d6f5447851fb20728754830a66f39a6 /simpleperf/utils.h | |
parent | 42ca0e1992695f08d5110d0dd258adc67941f01b (diff) | |
download | extras-a7a0e5076f0107173bc9ee067d13955d0d169f25.tar.gz |
simpleperf: replace SIMPLEPERF_ALIGN macro with Align inline function.
Change-Id: Id9e9e67174ab3f857eb2baa9609351b60586b8dd
Diffstat (limited to 'simpleperf/utils.h')
-rw-r--r-- | simpleperf/utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/simpleperf/utils.h b/simpleperf/utils.h index a22623ba..9ab0f864 100644 --- a/simpleperf/utils.h +++ b/simpleperf/utils.h @@ -26,7 +26,9 @@ #include <android-base/macros.h> #include <ziparchive/zip_archive.h> -#define SIMPLEPERF_ALIGN(value, alignment) (((value) + (alignment)-1) & ~((alignment)-1)) +static inline uint64_t Align(uint64_t value, uint64_t alignment) { + return (value + alignment - 1) & ~(alignment - 1); +} #ifdef _WIN32 #define CLOSE_ON_EXEC_MODE "" |