summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e9e85b7)
raw | patch | inline | side by side (parent: e9e85b7)
author | Manuel Luis Sanmartín Rozada <manuel.luis@gmail.com> | |
Sat, 30 May 2015 23:34:30 +0000 (01:34 +0200) | ||
committer | Manuel Luis Sanmartín Rozada <manuel.luis@gmail.com> | |
Sat, 30 May 2015 23:34:30 +0000 (01:34 +0200) |
src/processes.c | patch | blob | history |
diff --git a/src/processes.c b/src/processes.c
index 1c5b96308eb8275d3b2213f3ee0be0923ebcb2f6..de776a29de5db1a3f8de9fdef299b77ca2751a6a 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
FILE *fh;
char buffer[1024];
char filename[64];
- unsigned long long lib = 0;
- unsigned long long exe = 0;
- unsigned long long data = 0;
- unsigned long long threads = 0;
+ unsigned long lib = 0;
+ unsigned long exe = 0;
+ unsigned long data = 0;
+ unsigned long threads = 0;
char *fields[8];
int numfields;
while (fgets (buffer, sizeof(buffer), fh) != NULL)
{
- long long tmp;
+ unsigned long tmp;
char *endptr;
if (strncmp (buffer, "Vm", 2) != 0
errno = 0;
endptr = NULL;
- tmp = strtoll (fields[1], &endptr, /* base = */ 10);
+ tmp = strtoul (fields[1], &endptr, /* base = */ 10);
if ((errno == 0) && (endptr != fields[1]))
{
if (strncmp (buffer, "VmData", 6) == 0)