Improve code of func "cleanupmon"

This commit is contained in:
Alex Kotov 2021-11-20 22:30:55 +05:00
parent 642a6a37b1
commit 2ccbcbabcd
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 3 additions and 4 deletions

View File

@ -493,11 +493,10 @@ void cleanup()
void cleanupmon(Monitor *mon)
{
Monitor *m;
if (mon == mons)
if (mon == mons) {
mons = mons->next;
else {
} else {
Monitor *m;
for (m = mons; m && m->next != mon; m = m->next);
m->next = mon->next;
}