Lines Matching refs:cptr
267 char *cptr = NULL; in _test_calloc() local
269 cptr = calloc(TOO_BIG, sizeof(int)); in _test_calloc()
270 zassert_is_null((cptr), "calloc failed, errno: %d", errno); in _test_calloc()
271 free(cptr); in _test_calloc()
273 cptr = calloc(TOO_BIG, sizeof(char)); in _test_calloc()
274 zassert_is_null((cptr), "calloc failed, errno: %d", errno); in _test_calloc()
275 free(cptr); in _test_calloc()
277 cptr = calloc(CALLOC_BUFLEN, sizeof(char)); in _test_calloc()
278 zassert_not_null((cptr), "calloc failed, errno: %d", errno); in _test_calloc()
279 zassert_true(((memcmp(cptr, zerobuf, CALLOC_BUFLEN)) == 0), in _test_calloc()
281 memset(cptr, 'p', CALLOC_BUFLEN); in _test_calloc()
282 free(cptr); in _test_calloc()
283 cptr = NULL; in _test_calloc()
294 char *cptr = NULL; in ZTEST() local
296 cptr = reallocarray(ptr, TOO_BIG, sizeof(int)); in ZTEST()
298 zassert_is_null((cptr), "reallocarray failed, errno: %d"); in ZTEST()
299 free(cptr); in ZTEST()