Resolve clang-analyzer signed/unsigned comparison CI failure

This commit is contained in:
Nathan Scott 2020-12-22 16:58:17 +11:00
parent fc7aead36b
commit dfb9b82607
1 changed files with 2 additions and 2 deletions

View File

@ -377,7 +377,7 @@ void LinuxProcess_makeCommandStr(Process* this) {
}
assert(cmdlineBasenameOffset >= 0);
assert(cmdlineBasenameOffset <= strlen(cmdline));
assert(cmdlineBasenameOffset <= (int)strlen(cmdline));
if (!showMergedCommand || !procExe || !procComm) { /* fall back to cmdline */
if (showMergedCommand && !procExe && procComm && strlen(procComm)) { /* Prefix column with comm */
@ -415,7 +415,7 @@ void LinuxProcess_makeCommandStr(Process* this) {
int exeBasenameLen = exeLen - exeBasenameOffset;
assert(exeBasenameOffset >= 0);
assert(exeBasenameOffset <= strlen(procExe));
assert(exeBasenameOffset <= (int)strlen(procExe));
/* Start with copying exe */
if (showProgramPath) {