mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Assume full basename matches COMM when matching full COMM buffer
This commit is contained in:
parent
e33d4d9460
commit
dde2af1fdb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user