Skip to content

Commit

Permalink
no change, better readable
Browse files Browse the repository at this point in the history
  • Loading branch information
BPanther committed Mar 27, 2024
1 parent b2a22ba commit 3424569
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/screensetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/system/sysload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3424569

Please sign in to comment.