mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-26 15:55:46 +00:00
Ensure PCP platform ZramMeter always uses initialized data
This commit is contained in:
parent
407d32e121
commit
0e7ae9a592
@ -602,11 +602,13 @@ void Platform_setSwapValues(Meter* this) {
|
||||
}
|
||||
|
||||
void Platform_setZramValues(Meter* this) {
|
||||
(void)this;
|
||||
|
||||
int i, count = Metric_instanceCount(PCP_ZRAM_CAPACITY);
|
||||
if(!count)
|
||||
if (!count) {
|
||||
this->total = 0;
|
||||
this->values[0] = 0;
|
||||
this->values[1] = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
pmAtomValue *values = xCalloc(count, sizeof(pmAtomValue));
|
||||
ZramStats stats = {0};
|
||||
|
Loading…
Reference in New Issue
Block a user