summaryrefslogtreecommitdiff
path: root/sys/dev/wscons/wsevent.c
diff options
context:
space:
mode:
authorDavid Hill <dhill@cvs.openbsd.org>2017-04-09 18:05:18 +0000
committerDavid Hill <dhill@cvs.openbsd.org>2017-04-09 18:05:18 +0000
commit9219cf01483b9b82f52d67a9e03ac7140f1031f9 (patch)
tree3e3c9b4b128134af793ff86d8c18a7e94a9ac76c /sys/dev/wscons/wsevent.c
parent9d7d3799e9b37a36dfe61771a167f1451b3de8e4 (diff)
Convert some malloc(9) to mallocarray(9)
ok deraadt@
Diffstat (limited to 'sys/dev/wscons/wsevent.c')
-rw-r--r--sys/dev/wscons/wsevent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/wscons/wsevent.c b/sys/dev/wscons/wsevent.c
index 7838dee8a4f..37bbeb66172 100644
--- a/sys/dev/wscons/wsevent.c
+++ b/sys/dev/wscons/wsevent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsevent.c,v 1.15 2016/01/12 16:21:09 stefan Exp $ */
+/* $OpenBSD: wsevent.c,v 1.16 2017/04/09 18:05:17 dhill Exp $ */
/* $NetBSD: wsevent.c,v 1.16 2003/08/07 16:31:29 agc Exp $ */
/*
@@ -109,7 +109,7 @@ wsevent_init(struct wseventvar *ev)
return;
}
ev->get = ev->put = 0;
- ev->q = malloc(WSEVENT_QSIZE * sizeof(struct wscons_event),
+ ev->q = mallocarray(WSEVENT_QSIZE, sizeof(struct wscons_event),
M_DEVBUF, M_WAITOK | M_ZERO);
}