diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-12 07:12:59 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-12 07:12:59 +0000 |
commit | fbad287ef3c914d6b9bc44046a3318b4512fc0d7 (patch) | |
tree | f670bbabf83cb2d034f19f2e96650ff417d1da1d /sys/dev | |
parent | 4e1c00f9837faf34034361086b5fc609649e7c86 (diff) |
pretty up some malloc() calls
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/uaudio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c index 3a81988f685..a66dab42b65 100644 --- a/sys/dev/usb/uaudio.c +++ b/sys/dev/usb/uaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uaudio.c,v 1.108 2014/12/13 21:05:33 doug Exp $ */ +/* $OpenBSD: uaudio.c,v 1.109 2015/01/12 07:12:58 deraadt Exp $ */ /* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */ /* @@ -1372,7 +1372,7 @@ uaudio_io_terminaltype(int outtype, struct io_terminal *iot, int id) if (it->output->terminals[i] == outtype) return uaudio_merge_terminal_list(it); tml = malloc(TERMINAL_LIST_SIZE(it->output->size + 1), - M_TEMP, M_NOWAIT); + M_TEMP, M_NOWAIT); if (tml == NULL) { printf("uaudio_io_terminaltype: no memory\n"); return uaudio_merge_terminal_list(it); @@ -1941,7 +1941,8 @@ uaudio_identify_ac(struct uaudio_softc *sc, const usb_config_descriptor_t *cdesc ibufend = ibuf + aclen; dp = (const usb_descriptor_t *)ibuf; ndps = 0; - iot = malloc(sizeof(struct io_terminal) * 256, M_TEMP, M_NOWAIT | M_ZERO); + iot = malloc(256 * sizeof(struct io_terminal), + M_TEMP, M_NOWAIT | M_ZERO); if (iot == NULL) { printf("%s: no memory\n", __func__); return USBD_NOMEM; |