Date: Thu, 13 Mar 2014 16:30:18 +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 2/2] dev/hwpmc/hwpmc_uncore.c: malloc with correct pointer type Message-ID: <1394728180-22164-3-git-send-email-conrad.meyer@isilon.com> In-Reply-To: <1394728180-22164-1-git-send-email-conrad.meyer@isilon.com> References: <1394728180-22164-1-git-send-email-conrad.meyer@isilon.com>
next in thread | previous 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> --- sys/dev/hwpmc/hwpmc_uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index d6ec5c3..7e991dc 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -1212,7 +1212,7 @@ pmc_uncore_initialize(struct pmc_mdep *md, int maxcpu= ) PMCDBG(MDP,INI,1,"uncore-init pmcmask=3D0x%jx ucfri=3D%d", uncore_pmcmask= , uncore_ucf_ri); =20 - uncore_pcpu =3D malloc(sizeof(struct uncore_cpu **) * maxcpu, M_PMC, + uncore_pcpu =3D malloc(sizeof(*uncore_pcpu) * maxcpu, M_PMC, M_ZERO | M_WAITOK); =20 return (0); --=20 1.8.5.3
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1394728180-22164-3-git-send-email-conrad.meyer>