summaryrefslogtreecommitdiffstats
path: root/compat_ohash.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-06-20 02:24:40 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-06-20 02:24:40 +0000
commite61964a837e1a7fcdf2f591d07ed8aeccf8bf3b8 (patch)
treecff75a3a16cf6a25802caca8cf542607cbcf574d /compat_ohash.h
parent5bebfd6c365b15ecca2f23728c0ca04614acff56 (diff)
downloadmandoc-e61964a837e1a7fcdf2f591d07ed8aeccf8bf3b8.tar.gz
Merge from OpenBSD - Marc Espie improved the ohash interface:
* rename the halloc callback to calloc, provide overflow protection * rename the hfree callback to free, drop the useless size argument * prevent integer overflows in ohash_resize
Diffstat (limited to 'compat_ohash.h')
-rw-r--r--compat_ohash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/compat_ohash.h b/compat_ohash.h
index d07df18e..c5f81ec0 100644
--- a/compat_ohash.h
+++ b/compat_ohash.h
@@ -27,8 +27,8 @@
struct ohash_info {
ptrdiff_t key_offset;
void *data; /* user data */
- void *(*halloc)(size_t, void *);
- void (*hfree)(void *, size_t, void *);
+ void *(*calloc)(size_t, size_t, void *);
+ void (*free)(void *, void *);
void *(*alloc)(size_t, void *);
};