summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/src/thread.cpp
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-05-04 07:37:02 +0000
committerngie <ngie@FreeBSD.org>2016-05-04 07:37:02 +0000
commitc952e2bbbe7be5296f100c27ccb0ebde46cd55b5 (patch)
treef47b46c1917492eb18bc5bed00622d4cb4ebf695 /contrib/libc++/src/thread.cpp
parent85d22547026e894c75655080b99dad64ed9dcd43 (diff)
downloadFreeBSD-src-c952e2bbbe7be5296f100c27ccb0ebde46cd55b5.zip
FreeBSD-src-c952e2bbbe7be5296f100c27ccb0ebde46cd55b5.tar.gz
MFC r298304:
Fix issues identified by Coverity - Always munmap memory regions after mmap'ing them. - Make sure getpagesize() returns a value greater than 0 and use a cached value instead of always calling getpagesize(3). - Remove intermediate variable for assigning from $TMPDIR if set in the environment to eliminate warnings about pointer conversions with "/tmp", and to mute an invalid buffer overflow concern from Coverity (snprintf and tacking on a NUL terminator was alleviating that concern before). - Remove useless self-test of psize before it's initialized. - Check the return values of getrlimit/setrlimit. Cosmetic changes: - Replace a `(void*)0` with NULL. - Do some minor whitespace clean up. - Remove an unnecessary cast to mmap. - Make all munmap calls use ATF_REQUIRE_MSG instead of using the: > if (munmap(..) == -1) > atf_tc_fail(..) idiom. Employ the new idiom consistently when calling munmap. CID: 1331351, 1331382-1331386, 1331513, 1331514, 1331565, 1331583, 1331694
Diffstat (limited to 'contrib/libc++/src/thread.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud