From da454997bf1f721f958c8f619155c21c8e033cfc Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Thu, 8 Apr 2021 11:04:07 +1000 Subject: Remove dynamic allocation of PCP metric atomvalues expansion This is no longer used and confuses Coverity scans, drop it. --- pcp/Platform.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'pcp') diff --git a/pcp/Platform.c b/pcp/Platform.c index e4675d71..6519342b 100644 --- a/pcp/Platform.c +++ b/pcp/Platform.c @@ -246,13 +246,6 @@ pmAtomValue* Metric_values(Metric metric, pmAtomValue *atom, int count, int type if (!vset || vset->numval <= 0) return NULL; - /* allocate space for atom if needed */ - if (!atom || !count) { - if (!count) - count = vset->numval; - atom = xCalloc(count, sizeof(pmAtomValue)); - } - /* extract requested number of values as requested type */ const pmDesc* desc = &pcp->descs[metric]; for (int i = 0; i < vset->numval; i++) { -- cgit v1.2.3