Remove dynamic allocation of PCP metric atomvalues expansion

This is no longer used and confuses Coverity scans, drop it.
This commit is contained in:
Nathan Scott 2021-04-08 11:04:07 +10:00
parent 5abd7f2198
commit da454997bf
1 changed files with 0 additions and 7 deletions

View File

@ -246,13 +246,6 @@ pmAtomValue* Metric_values(Metric metric, pmAtomValue *atom, int count, int type
if (!vset || vset->numval <= 0) if (!vset || vset->numval <= 0)
return NULL; 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 */ /* extract requested number of values as requested type */
const pmDesc* desc = &pcp->descs[metric]; const pmDesc* desc = &pcp->descs[metric];
for (int i = 0; i < vset->numval; i++) { for (int i = 0; i < vset->numval; i++) {