Lines Matching refs:ptr
26 reallocarray_nowarn (void *ptr, size_t nmemb, size_t size) in reallocarray_nowarn() argument
33 void *ret = reallocarray (ptr, nmemb, size); in reallocarray_nowarn()
44 void *ptr = NULL; in do_test() local
54 ptr = reallocarray_nowarn (NULL, max, 2); in do_test()
55 TEST_VERIFY (!ptr); in do_test()
59 ptr = reallocarray_nowarn (NULL, 2, max); in do_test()
60 TEST_VERIFY (!ptr); in do_test()
66 ptr = reallocarray_nowarn (NULL, a, b); in do_test()
67 TEST_VERIFY (!ptr); in do_test()
71 ptr = reallocarray_nowarn (NULL, b, a); in do_test()
72 TEST_VERIFY (!ptr); in do_test()
77 ptr = reallocarray (NULL, 10, 2); in do_test()
78 TEST_VERIFY_EXIT (ptr); in do_test()
79 TEST_VERIFY_EXIT (malloc_usable_size (ptr) >= 10*2); in do_test()
81 memset (ptr, 0xAF, 10*2); in do_test()
84 ptr2 = reallocarray (ptr, 20, 2); in do_test()
87 ptr = ptr2; in do_test()
88 TEST_VERIFY (malloc_usable_size (ptr) >= 20*2); in do_test()
90 c = ptr; in do_test()
100 ptr2 = reallocarray (ptr, 5, 3); in do_test()
103 ptr = ptr2; in do_test()
104 TEST_VERIFY_EXIT (malloc_usable_size (ptr) >= 5*3); in do_test()
106 c = ptr; in do_test()
117 ptr2 = reallocarray_nowarn (ptr, 2, ~(size_t)0); in do_test()
121 c = ptr; in do_test()
130 free (ptr); in do_test()