summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-02-16 14:34:25 -0200
committerHisham <hisham@gobolinux.org>2016-02-16 14:34:25 -0200
commite0c364b9cce211c63bce5460001d7cc7a447ca83 (patch)
treee023892342715081b2c02e369f786bace8d1bbe9 /linux
parent474d26cea8ad31e77722f81ba801b2c29783e947 (diff)
Fix reading of io_syscr and io_syscw.
Issue noticed by GCC6 -Wmisleading-indentation. Thanks @JIghtuse and @Explorer09! Closes #409.
Diffstat (limited to 'linux')
-rw-r--r--linux/LinuxProcessList.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index ec643abc..dd03e55c 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -292,15 +292,16 @@ static void LinuxProcessList_readIoFile(LinuxProcess* process, const char* dirna
}
break;
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);
- else if (strncmp(line+1, "yscw: ", 6) == 0)
- sscanf(line, "syscw: %32llu", &process->io_syscw);
+ } else if (strncmp(line+1, "yscw: ", 6) == 0) {
process->io_syscw = strtoull(line+7, NULL, 10);
+ }
break;
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);
+ }
}
}
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy