From 1fec31a026d03f6004a63067a9dc90c7e5980770 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 13 Jul 2014 20:49:42 +0000 Subject: [PATCH] obvious conversion to mallocarray() --- sys/lib/libz/zopenbsd.c | 5 +---- 1 file changed, 1 insertion(+), 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 -- 2.20.1