Skip to content

Commit aa9fa65

Browse files
committed
Table_cleanupRow() logic tweak
Use a goto label when a table row should be removed. No changes to code behavior.
1 parent 00516f9 commit aa9fa65

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Table.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,18 +336,22 @@ void Table_cleanupRow(Table* table, Row* row, int idx) {
336336
if (row->tombStampMs > 0) {
337337
// remove tombed process
338338
if (host->monotonicMs >= row->tombStampMs) {
339-
Table_removeIndex(table, row, idx);
339+
goto remove;
340340
}
341-
} else if (row->updated == false) {
341+
} else if (!row->updated) {
342342
// process no longer exists
343343
if (settings->highlightChanges && row->wasShown) {
344344
// mark tombed
345345
row->tombStampMs = host->monotonicMs + 1000 * settings->highlightDelaySecs;
346346
} else {
347347
// immediately remove
348-
Table_removeIndex(table, row, idx);
348+
goto remove;
349349
}
350350
}
351+
return;
352+
353+
remove:
354+
Table_removeIndex(table, row, idx);
351355
}
352356

353357
void Table_cleanupEntries(Table* this) {

0 commit comments

Comments
 (0)