projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fdb04e
)
load plugin: Fix the Linux code that reads `/proc/loadavg'.
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Thu, 21 Jun 2007 08:39:39 +0000
(10:39 +0200)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Thu, 21 Jun 2007 08:39:39 +0000
(10:39 +0200)
src/load.c
patch
|
blob
|
history
diff --git
a/src/load.c
b/src/load.c
index
5e1d9d3
..
22872f0
100644
(file)
--- a/
src/load.c
+++ b/
src/load.c
@@
-88,7
+88,7
@@
static int load_read (void)
char errbuf[1024];
WARNING ("load: fopen: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
- return;
+ return
(-1)
;
}
if (fgets (buffer, 16, loadavg) == NULL)
@@
-97,7
+97,7
@@
static int load_read (void)
WARNING ("load: fgets: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
fclose (loadavg);
- return;
+ return
(-1)
;
}
if (fclose (loadavg))
@@
-110,7
+110,7
@@
static int load_read (void)
numfields = strsplit (buffer, fields, 8);
if (numfields < 3)
- return;
+ return
(-1)
;
snum = atof (fields[0]);
mnum = atof (fields[1]);