summaryrefslogtreecommitdiffstats
path: root/lib/libusbhid/usage.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2007-09-03 14:26:54 +0000
committerderaadt <deraadt@openbsd.org>2007-09-03 14:26:54 +0000
commit7de199b689371aaca91a9e97807c0e3d78bd26e2 (patch)
tree008cda564c2c9c7d4dc1356cae21e1209fd68839 /lib/libusbhid/usage.c
parentuse calloc() for the sake of regularity, prompted by deraadt@ (diff)
downloadwireguard-openbsd-7de199b689371aaca91a9e97807c0e3d78bd26e2.tar.xz
wireguard-openbsd-7de199b689371aaca91a9e97807c0e3d78bd26e2.zip
malloc(n * m) -> calloc(n, m); ok espie
Diffstat (limited to 'lib/libusbhid/usage.c')
-rw-r--r--lib/libusbhid/usage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libusbhid/usage.c b/lib/libusbhid/usage.c
index 6dc8718477a..228dbb74c47 100644
--- a/lib/libusbhid/usage.c
+++ b/lib/libusbhid/usage.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usage.c,v 1.12 2007/03/20 03:42:52 tedu Exp $ */
+/* $OpenBSD: usage.c,v 1.13 2007/09/03 14:26:54 deraadt Exp $ */
/* $NetBSD: usage.c,v 1.1 2001/12/28 17:45:27 augustss Exp $ */
/*
@@ -173,7 +173,7 @@ hid_start(const char *hidname)
curpage->usage = no;
curpage->pagesize = 0;
curpage->pagesizemax = 10;
- curpage->page_contents = malloc(curpage->pagesizemax *
+ curpage->page_contents = calloc(curpage->pagesizemax,
sizeof (struct usage_in_page));
if (!curpage->page_contents)
goto fail;