void tests_free (void *ptr, size_t size) { struct header **hp = tests_free_find (ptr); struct header *h = *hp; if (h->size != size) { fprintf (stderr, "tests_free(): bad size %lu, should be %lu\n", (unsigned long) size, (unsigned long) h->size); abort (); } tests_free_nosize (ptr); }
void tests_free (void *ptr, size_t size) { struct header **hp = tests_free_find (ptr); struct header *h = *hp; if (h->size != size) { /* Note: we should use the standard %zu to print sizes, but this is not supported by old C implementations. */ printf ("tests_free(): bad size %lu, should be %lu\n", (unsigned long) size, (unsigned long) h->size); abort (); } tests_free_nosize (ptr); }