From 5c7a083493bb065c70c4b90880c9e8f61084c505 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 22 Jun 2010 16:15:10 -0700 Subject: [PATCH] fix typo in ALIGN macro Change-Id: Idaddf65f0b726a158f47639223f4281fd07447a7 --- gralloc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gralloc.cpp b/gralloc.cpp index e551120..9b3d95f 100644 --- a/gralloc.cpp +++ b/gralloc.cpp @@ -339,7 +339,7 @@ try_ashmem: /*****************************************************************************/ static inline size_t ALIGN(size_t x, size_t align) { - return (x + align-1) & (align-1); + return (x + align-1) & ~(align-1); } static int gralloc_alloc(alloc_device_t* dev,