mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 10:21:10 +02:00
turn some comparsions for a better readability
Origin commit data
------------------
Commit: bee4cb4959
Author: vanhofen <vanhofen@gmx.de>
Date: 2024-03-25 (Mon, 25 Mar 2024)
Origin message was:
------------------
- turn some comparsions for a better readability
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -61,7 +61,7 @@ void *cSysLoad::Run(void *arg)
|
||||
std::string line;
|
||||
while (getline(in, line)) {
|
||||
unsigned long _stat_user, _stat_nice, _stat_system, _stat_idle;
|
||||
if (4 == sscanf(line.c_str(), "cpu %lu %lu %lu %lu", &_stat_user, &_stat_nice, &_stat_system, &_stat_idle)) {
|
||||
if (sscanf(line.c_str(), "cpu %lu %lu %lu %lu", &_stat_user, &_stat_nice, &_stat_system, &_stat_idle) == 4) {
|
||||
unsigned long _stat_total = _stat_user + _stat_nice + _stat_system + _stat_idle;
|
||||
if (stat_total) {
|
||||
unsigned long div = _stat_total - stat_total;
|
||||
|
Reference in New Issue
Block a user