diff options
author | Heikki Kallasjoki <fis@zem.fi> | 2018-12-12 18:08:06 +0000 |
---|---|---|
committer | Heikki Kallasjoki <fis+github@zem.fi> | 2018-12-12 18:10:51 +0000 |
commit | d03dea4d7dbfb62ed0c3c21cdd9ad350f0526432 (patch) | |
tree | a871df40e91ecdb8f07428d7f278d527f2bbd4b6 /meminfo.c | |
parent | 7ec8aa9fcfba92019f537cd19dac4ce15674ddd6 (diff) | |
download | nano-exporter-d03dea4d7dbfb62ed0c3c21cdd9ad350f0526432.tar.gz nano-exporter-d03dea4d7dbfb62ed0c3c21cdd9ad350f0526432.tar.xz nano-exporter-d03dea4d7dbfb62ed0c3c21cdd9ad350f0526432.zip |
Allow meminfo metric values that are followed by a newline.
Fixes #8.
Diffstat (limited to 'meminfo.c')
-rw-r--r-- | meminfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meminfo.c b/meminfo.c index 9ee1712..407b946 100644 --- a/meminfo.c +++ b/meminfo.c @@ -74,7 +74,7 @@ static void meminfo_collect(scrape_req *req, void *ctx) { do p++; while (*p == ' '); double value = strtod(p, &p); - if (*p != '\0' && *p != ' ') + if (*p != '\0' && *p != '\n' && *p != ' ') continue; if (*p == ' ') { |