Fix reading of io_syscr and io_syscw.

Issue noticed by GCC6 -Wmisleading-indentation.
Thanks @JIghtuse and @Explorer09!
Closes #409.
This commit is contained in:
Hisham 2016-02-16 14:34:25 -02:00
parent 474d26cea8
commit e0c364b9cc
1 changed files with 5 additions and 4 deletions

View File

@ -292,17 +292,18 @@ static void LinuxProcessList_readIoFile(LinuxProcess* process, const char* dirna
} }
break; break;
case 's': case 's':
if (line[5] == 'r' && strncmp(line+1, "yscr: ", 6) == 0) if (line[5] == 'r' && strncmp(line+1, "yscr: ", 6) == 0) {
process->io_syscr = strtoull(line+7, NULL, 10); process->io_syscr = strtoull(line+7, NULL, 10);
else if (strncmp(line+1, "yscw: ", 6) == 0) } else if (strncmp(line+1, "yscw: ", 6) == 0) {
sscanf(line, "syscw: %32llu", &process->io_syscw);
process->io_syscw = strtoull(line+7, NULL, 10); process->io_syscw = strtoull(line+7, NULL, 10);
}
break; break;
case 'c': case 'c':
if (strncmp(line+1, "ancelled_write_bytes: ", 22) == 0) if (strncmp(line+1, "ancelled_write_bytes: ", 22) == 0) {
process->io_cancelled_write_bytes = strtoull(line+23, NULL, 10); process->io_cancelled_write_bytes = strtoull(line+23, NULL, 10);
} }
} }
}
} }
#endif #endif