summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-08-10 12:48:44 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-08-10 12:48:44 +0000
commit6f0839aaad147c27d8bc39c6288ebb36506e4ab9 (patch)
tree83d27fff78e3f9636101d24650946422c79c3c0d
parent020d34bcf459b494fb687e8fbae731cff290c028 (diff)
sizeof() a pointer of the right struct to appease clang.
-rw-r--r--sys/dev/usb/uhidev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index dde8ace2469..84bcc4a2646 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.c,v 1.62 2014/07/12 18:48:52 tedu Exp $ */
+/* $OpenBSD: uhidev.c,v 1.63 2014/08/10 12:48:43 mpi Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -215,7 +215,7 @@ uhidev_attach(struct device *parent, struct device *self, void *aux)
printf(", %d report id%s", nrepid, nrepid > 1 ? "s" : "");
printf("\n");
nrepid++;
- sc->sc_subdevs = malloc(nrepid * sizeof(struct device *),
+ sc->sc_subdevs = malloc(nrepid * sizeof(struct uhidev *),
M_USBDEV, M_NOWAIT | M_ZERO);
if (sc->sc_subdevs == NULL) {
printf("%s: no memory\n", DEVNAME(sc));