aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitc2201e153e701130fbd08c75765b330f9280144f (patch)
tree2486817a616731edd1f5e98834c12ed2b786a044 /compat_ohash.h
parent4b68a3c80b4d2c00a2dd66f531e52f4677a118c6 (diff)
downloadmandoc-c2201e153e701130fbd08c75765b330f9280144f.tar.gz
mandoc-c2201e153e701130fbd08c75765b330f9280144f.tar.zst
mandoc-c2201e153e701130fbd08c75765b330f9280144f.zip
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 *);
};