Преглед изворни кода

SystemMonitor: Uninitialized struct member in ProcessModel, found by Coverity

This is really a nop, as the cpu_percent is computed later. Zero the
value just to keep things sane.
Brian Gianforcaro пре 4 година
родитељ
комит
f7b1591a5c
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      Applications/SystemMonitor/ProcessModel.cpp

+ 1 - 0
Applications/SystemMonitor/ProcessModel.cpp

@@ -394,6 +394,7 @@ void ProcessModel::update()
             state.sid = it.value.sid;
             state.times_scheduled = thread.times_scheduled;
             state.cpu = thread.cpu;
+            state.cpu_percent = 0;
             state.priority = thread.priority;
             state.effective_priority = thread.effective_priority;
             state.state = thread.state;