* Re: [LTP] [PATCH] hugeshmat01: fix the wrong generated addr
[not found] <1341800766-5786-1-git-send-email-gaowanlong@cn.fujitsu.com>
@ 2012-07-09 3:46 ` Caspar Zhang
0 siblings, 0 replies; only message in thread
From: Caspar Zhang @ 2012-07-09 3:46 UTC (permalink / raw)
To: Wanlong Gao; +Cc: ltp-list
On 07/09/2012 10:26 AM, Wanlong Gao wrote:
> The missed parentheses made the wrong operation.
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Thanks for catching this. Pushed.
Caspar
> ---
> 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");
> }
>
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-09 3:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1341800766-5786-1-git-send-email-gaowanlong@cn.fujitsu.com>
2012-07-09 3:46 ` [LTP] [PATCH] hugeshmat01: fix the wrong generated addr Caspar Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox