Date: Thu, 13 Mar 2014 16:35:34 +0000 From: "Meyer, Conrad" <conrad.meyer@isilon.com> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Cc: "Meyer, Conrad" <conrad.meyer@isilon.com> Subject: [PATCH] x86/mca.c: malloc with correct pointer type Message-ID: <1394728529-22495-1-git-send-email-conrad.meyer@isilon.com>
next in thread | raw e-mail | index | archive | help
Another trivial one discovered by Clang. Sponsored by: EMC/Isilon storage division Signed-off-by: Conrad Meyer <conrad.meyer@isilon.com> --- Had to track down where this file lived in CURRENT, since we have it in an = old location in OneFS. --- sys/x86/x86/mca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index 0e246ed..ac0b957 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -700,8 +700,8 @@ cmci_setup(void) { int i; =20 - cmc_state =3D malloc((mp_maxid + 1) * sizeof(struct cmc_state **), - M_MCA, M_WAITOK); + cmc_state =3D malloc((mp_maxid + 1) * sizeof(*cmc_state), M_MCA, + M_WAITOK); for (i =3D 0; i <=3D mp_maxid; i++) cmc_state[i] =3D malloc(sizeof(struct cmc_state) * mca_banks, M_MCA, M_WAITOK | M_ZERO); --=20 1.8.5.3
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1394728529-22495-1-git-send-email-conrad.meyer>