Assume full basename matches COMM when matching full COMM buffer

This commit is contained in:
Narendran Gopalakrishnan 2020-11-09 18:42:24 +01:00 committed by BenBE
parent e33d4d9460
commit dde2af1fdb
1 changed files with 1 additions and 2 deletions

View File

@ -240,8 +240,7 @@ static bool findCommInCmdline(const char *comm, const char *cmdline, int cmdline
}
tokenLen = token - tokenBase;
if (((commLen < (TASK_COMM_LEN - 1) && tokenLen == commLen) ||
(commLen == (TASK_COMM_LEN - 1) && tokenLen >= commLen)) &&
if ((tokenLen == commLen || (tokenLen > commLen && commLen == (TASK_COMM_LEN - 1))) &&
strncmp(tokenBase, comm, commLen) == 0) {
*pCommStart = tokenBase - cmdline;
*pCommEnd = token - cmdline;