On Mon, Aug 1, 2011 at 9:04 PM, tangchen <[email protected]> wrote:
> Signed-off-by: Tang Chen <[email protected]>
> ---
...
> - tst_resm(TFAIL, "Normal mmap() into high region
> unexpectedly succeeded on %s, errno=%d : %s",
> - TEMPFILE, errno, strerror(errno));
> + tst_resm(TFAIL, "Normal mmap() into high region
> unexpectedly "
> + "succeeded on %s, errno=%d : %s",
> + TEMPFILE, errno, strerror(errno));
If you're going to modify this, please drop the errno=%d: %s printout
and use TFAIL|TERRNO instead.
> + /* Unmap the mapped memory */
> + if (munmap(addr, page_sz) != 0) {
> + tst_brkm(TFAIL, NULL, "munmap() fails to
> unmap the "
> + "memory, errno=%d : %s", errno,
> strerror(errno));
> + }
See above.
> continue;
> } else {
> tst_resm(TPASS, "Normal mmap() into high region failed
> correctly");
Just close the file descriptor here and you don't need to put a close
invocation outside of the loop. It's kind of nice being more explicit
that way.
> @@ -133,6 +117,7 @@ main(int ac, char **av)
> close(fildes);
> }
>
> + close(fildes);
...
The rest seems ok.
-Garrett
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list