[PATCH 1/2] dev/hwpmc/hwpmc_core.c: malloc with correct pointer type
Meyer, Conrad
conrad.meyer at isilon.com
Thu Mar 13 16:30:41 UTC 2014
Another trivial one discovered by Clang.
Sponsored by: EMC/Isilon storage division
Signed-off-by: Conrad Meyer <conrad.meyer at isilon.com>
---
sys/dev/hwpmc/hwpmc_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c
index 39f49e3..e4d543c 100644
--- a/sys/dev/hwpmc/hwpmc_core.c
+++ b/sys/dev/hwpmc/hwpmc_core.c
@@ -2679,7 +2679,7 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, int version_override)
PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask,
core_iaf_ri);
- core_pcpu = malloc(sizeof(struct core_cpu **) * maxcpu, M_PMC,
+ core_pcpu = malloc(sizeof(*core_pcpu) * maxcpu, M_PMC,
M_ZERO | M_WAITOK);
/*
--
1.8.5.3
More information about the freebsd-hackers
mailing list