summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1fdb04e)
raw | patch | inline | side by side (parent: 1fdb04e)
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 5e1d9d30a0758fb362661dee1551f9557777b652..22872f04f2be88489bc0e207b293dbd0e9600c4a 100644 (file)
--- a/src/load.c
+++ b/src/load.c
char errbuf[1024];
WARNING ("load: fopen: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
- return;
+ return (-1);
}
if (fgets (buffer, 16, loadavg) == NULL)
WARNING ("load: fgets: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
fclose (loadavg);
- return;
+ return (-1);
}
if (fclose (loadavg))
numfields = strsplit (buffer, fields, 8);
if (numfields < 3)
- return;
+ return (-1);
snum = atof (fields[0]);
mnum = atof (fields[1]);