From: deraadt Date: Sun, 13 Jul 2014 20:49:42 +0000 (+0000) Subject: obvious conversion to mallocarray() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1fec31a026d03f6004a63067a9dc90c7e5980770;p=openbsd obvious conversion to mallocarray() --- 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