The missed parentheses made the wrong operation.

Signed-off-by: Wanlong Gao <[email protected]>
---
 testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c 
b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
index 84a9121..2206dad 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c
@@ -128,8 +128,8 @@ int main(int ac, char **av)
                         * address for TC[1]
                         */
                        if (i == 0 && addr != (void *)-1)
-                               TC[1].addr = (void *)((unsigned long)addr &
-                                           ~(SHMLBA-1) + SHMLBA - 1);
+                               TC[1].addr = (void *)(((unsigned long)addr &
+                                            ~(SHMLBA-1)) + SHMLBA - 1);
                        if (shmdt(addr) == -1)
                                tst_brkm(TBROK|TERRNO, cleanup, "shmdt");
                }
-- 
1.7.11.rc0


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to