diff options
Diffstat (limited to 'src/util/os_load.c')
-rw-r--r-- | src/util/os_load.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/os_load.c b/src/util/os_load.c index f7b5dff96..e54147ff4 100644 --- a/src/util/os_load.c +++ b/src/util/os_load.c | |||
@@ -156,9 +156,10 @@ updateUsage () | |||
156 | unsigned long long usage_time = 0, total_time = 1; | 156 | unsigned long long usage_time = 0, total_time = 1; |
157 | 157 | ||
158 | /* Get the first line with the data */ | 158 | /* Get the first line with the data */ |
159 | memset (line, 0, sizeof (line)); | ||
159 | rewind (proc_stat); | 160 | rewind (proc_stat); |
160 | fflush (proc_stat); | 161 | fflush (proc_stat); |
161 | if (NULL == fgets (line, 256, proc_stat)) | 162 | if (NULL == fgets (line, sizeof (line), proc_stat)) |
162 | { | 163 | { |
163 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR | | 164 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR | |
164 | GNUNET_ERROR_TYPE_BULK, | 165 | GNUNET_ERROR_TYPE_BULK, |