mirror of https://github.com/xzeldon/htop.git
Use break inside loop with false condition
Found by clang-tidy. home/christian/Coding/workspaces/htop/Process.c:505:13: warning: 'continue' in loop with false condition is equivalent to 'break' [bugprone-terminating-continue] WRITE_HIGHLIGHT(0, strlen(procComm), commAttr, CMDLINE_HIGHLIGHT_FLAG_COMM); ^ /home/christian/Coding/workspaces/htop/Process.c:461:13: note: expanded from macro 'WRITE_HIGHLIGHT' continue; \ ^
This commit is contained in:
parent
c3746dc901
commit
5dec9475bb
|
@ -458,7 +458,7 @@ void Process_makeCommandStr(Process* this) {
|
||||||
/* Check if we still have capacity */ \
|
/* Check if we still have capacity */ \
|
||||||
assert(mc->highlightCount < ARRAYSIZE(mc->highlights)); \
|
assert(mc->highlightCount < ARRAYSIZE(mc->highlights)); \
|
||||||
if (mc->highlightCount >= ARRAYSIZE(mc->highlights)) \
|
if (mc->highlightCount >= ARRAYSIZE(mc->highlights)) \
|
||||||
continue; \
|
break; \
|
||||||
\
|
\
|
||||||
mc->highlights[mc->highlightCount].offset = str - strStart + (_offset) - mbMismatch; \
|
mc->highlights[mc->highlightCount].offset = str - strStart + (_offset) - mbMismatch; \
|
||||||
mc->highlights[mc->highlightCount].length = _length; \
|
mc->highlights[mc->highlightCount].length = _length; \
|
||||||
|
|
Loading…
Reference in New Issue