aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-ohash.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-06-20 02:55:49 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-06-20 02:55:49 +0000
commitb7a2831fbcd6d60e1569cdd4aa4e19945ffd5c60 (patch)
tree84fab7d32d1d75541223c2aff50989ce0d264485 /test-ohash.c
parent9bf5108aa6a4bdf442bea16a012952806fbaa900 (diff)
downloadmandoc-b7a2831fbcd6d60e1569cdd4aa4e19945ffd5c60.tar.gz
mandoc-b7a2831fbcd6d60e1569cdd4aa4e19945ffd5c60.tar.zst
mandoc-b7a2831fbcd6d60e1569cdd4aa4e19945ffd5c60.zip
let the build system cope with the recent ohash changes
Diffstat (limited to 'test-ohash.c')
-rw-r--r--test-ohash.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test-ohash.c b/test-ohash.c
index 84d1b677..522ad708 100644
--- a/test-ohash.c
+++ b/test-ohash.c
@@ -3,16 +3,18 @@
#include <stdlib.h>
#include <ohash.h>
-void *xalloc(size_t sz, void *arg) { return(calloc(sz,1)); }
-void xfree(void *p, size_t sz, void *arg) { free(p); }
+void *xmalloc(size_t sz, void *arg) { return(calloc(1,sz)); }
+void *xcalloc(size_t nmemb, size_t sz, void *arg) { return(calloc(nmemb,sz)); }
+void xfree(void *p, void *arg) { free(p); }
int
main(void)
{
struct ohash h;
struct ohash_info i;
- i.halloc = i.alloc = xalloc;
- i.hfree = xfree;
+ i.alloc = xmalloc;
+ i.calloc = xcalloc;
+ i.free = xfree;
ohash_init(&h, 2, &i);
ohash_delete(&h);
return 0;