sanity checking after calling pathconf added Signed-off-by: Maninder Singh <maninder...@samsung.com> Reviewed-by: Yogesh Narayan Gaur <yn.g...@samsung.com> --- .../conformance/interfaces/shm_unlink/10-1.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-1.c index 768863c..20e5bef 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-1.c @@ -27,6 +27,11 @@ int main(void) char *shm_name; name_max = pathconf("/", _PC_NAME_MAX); + + if (name_max == -1) { + perror("An error occurs when calling pathconf()"); + return PTS_UNRESOLVED; + } shm_name = malloc(name_max + 3); if (!shm_name) { -- 1.7.9.5 ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list