mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
linux/LinuxProcessList: fix reading of number of read syscalls of process
The "if" tests if the character at index "5" is 'r', as a first quick check. However at index "5" will always be a colon ":". This patch fixes the off-by-one error. htop now shows proper values in the RD_SYSC column. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
df9922a67e
commit
70ed51a303
@ -436,7 +436,7 @@ static void LinuxProcessList_readIoFile(LinuxProcess* process, const char* dirna
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
if (line[5] == 'r' && strncmp(line+1, "yscr: ", 6) == 0) {
|
||||
if (line[4] == 'r' && strncmp(line+1, "yscr: ", 6) == 0) {
|
||||
process->io_syscr = strtoull(line+7, NULL, 10);
|
||||
} else if (strncmp(line+1, "yscw: ", 6) == 0) {
|
||||
process->io_syscw = strtoull(line+7, NULL, 10);
|
||||
|
Loading…
Reference in New Issue
Block a user