summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-13 20:49:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-13 20:49:43 +0000
commit172181a54242ec8f73b4d8f4da0dba9ff33e5c75 (patch)
treedaf300ada07376b91aefa4ab5e41476da0cb22c5 /sys
parentebbfe1a4e73defbc5f4e3cb686d6cc47f8580895 (diff)
obvious conversion to mallocarray()
Diffstat (limited to 'sys')
-rw-r--r--sys/lib/libz/zopenbsd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/lib/libz/zopenbsd.c b/sys/lib/libz/zopenbsd.c
index 7c6a772daa1..10d3845be67 100644
--- a/sys/lib/libz/zopenbsd.c
+++ b/sys/lib/libz/zopenbsd.c
@@ -10,10 +10,7 @@ zcalloc(notused, items, size)
void *notused;
u_int items, size;
{
- void *ptr;
-
- ptr = malloc(items * size, M_DEVBUF, M_NOWAIT);
- return ptr;
+ return mallocarray(items, size, M_DEVBUF, M_NOWAIT);
}
void