mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +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:
@@ -563,7 +563,7 @@ std::string CNetAdapter::getMacAddr(void)
|
||||
long stat;
|
||||
u_char addr[6];
|
||||
stat = mac_addr_sys(addr);
|
||||
if (0 == stat)
|
||||
if (stat == 0)
|
||||
{
|
||||
std::stringstream mac_tmp;
|
||||
for (int i = 0; i < 6; ++i)
|
||||
|
@@ -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