- buffer = (char *)malloc(sizeof (psinfo_t));
- memset(buffer, 0, sizeof(psinfo_t));
- read_file_contents(f_psinfo, buffer, sizeof (psinfo_t));
- myInfo = (psinfo_t *) buffer;
+ status = read_file_contents (path, (void *) &info, sizeof (info));
+ if (status != ((int) buffer_size))
+ {
+ ERROR ("processes plugin: Unexpected return value "
+ "while reading \"%s\": "
+ "Returned %i but expected %zu.",
+ path, status, buffer_size);
+ return (NULL);
+ }