diff options
author | 2014-08-10 12:48:43 +0000 | |
---|---|---|
committer | 2014-08-10 12:48:43 +0000 | |
commit | f1f783a6815188bbb51dc518faec43c6a5fe5b72 (patch) | |
tree | 8c71e0221f09abf5e7b5545f4a3475bc94934c1b | |
parent | Note that qemu 1.7.2 has the VLAN bug fix, too (diff) | |
download | wireguard-openbsd-f1f783a6815188bbb51dc518faec43c6a5fe5b72.tar.xz wireguard-openbsd-f1f783a6815188bbb51dc518faec43c6a5fe5b72.zip |
sizeof() a pointer of the right struct to appease clang.
-rw-r--r-- | sys/dev/usb/uhidev.c | 4 |
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)); |