| |
| |
| |
| #include <stdlib.h> |
| #include "test.h" |
| |
| int main(void) |
| { |
| void *p = malloc(0); |
| void *q = malloc(0); |
| void *r = malloc(0); |
| if (!p || !q || !r) |
| t_error("malloc(0) returned NULL\n"); |
| if (p == q || p == r || q == r) |
| t_error("malloc(0) returned non-unique pointers: %p, %p, %p\n", p, q, r); |
| free(q); |
| free(p); |
| free(r); |
| return t_status; |
| } |