summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6553ee5)
raw | patch | inline | side by side (parent: 6553ee5)
author | Clément Stenac <clement.stenac@exalead.com> | |
Sun, 14 Mar 2010 08:14:11 +0000 (09:14 +0100) | ||
committer | Clément Stenac <clement.stenac@exalead.com> | |
Sun, 14 Mar 2010 08:14:11 +0000 (09:14 +0100) |
src/processes.c | patch | blob | history |
diff --git a/src/processes.c b/src/processes.c
index 8853660c89bcebf7f24c658007ccd8b72f0d9001..7bbd3f6b5e35dd158c06b9a2419cd3bd5c413057 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
if ((fh = fopen (filename, "r")) == NULL)
return (NULL);
- while (fgets (buffer, 1024, fh) != NULL)
+ while (fgets (buffer, sizeof(buffer), fh) != NULL)
{
long long tmp;
char *endptr;
- if (strncasecmp (buffer, "Vm", 2) != 0)
+ if (strncmp (buffer, "Vm", 2) != 0)
continue;
- numfields = strsplit (buffer, fields, 8);
+ numfields = strsplit (buffer, fields,
+ STATIC_ARRAY_SIZE (fields));
if (numfields < 2)
continue;