From 3424569f44325155d8f42eee301ffcaac7fcc16e Mon Sep 17 00:00:00 2001 From: BPanther Date: Wed, 27 Mar 2024 20:26:52 +0100 Subject: [PATCH] no change, better readable --- src/gui/screensetup.cpp | 2 +- src/system/sysload.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/screensetup.cpp b/src/gui/screensetup.cpp index 4c5a14b68..f86cf38d9 100644 --- a/src/gui/screensetup.cpp +++ b/src/gui/screensetup.cpp @@ -500,7 +500,7 @@ void CScreenSetup::loadBorders() t_channel_id chan; long long unsigned _chan; borderFrame b; - if (5 == sscanf(s, "%llx %d %d %d %d", &_chan, &b.sx, &b.sy, &b.ex, &b.ey)) { + if (sscanf(s, "%llx %d %d %d %d", &_chan, &b.sx, &b.sy, &b.ex, &b.ey) == 5) { chan = _chan; borderMap[chan] = b; } diff --git a/src/system/sysload.cpp b/src/system/sysload.cpp index c8e0e809f..ce7895b64 100644 --- a/src/system/sysload.cpp +++ b/src/system/sysload.cpp @@ -64,7 +64,7 @@ void *cSysLoad::Run(void *arg) 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)