author | Florian Forster <octo@collectd.org> | |
Mon, 5 Sep 2016 09:22:39 +0000 (11:22 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 14 Sep 2016 18:36:45 +0000 (20:36 +0200) | ||
commit | 624012732bd5db5449c58d9a0f9d844fb4a391c1 | |
tree | da8b724d47eeaf4d51aa47592d13bc980ed933c8 | tree | snapshot |
parent | 56a368209ea679eaa6790de419b68573505afb74 | commit | diff |
hugepages plugin: Refactor the read_hugepage_entry() function.
* Move static variables into the "entry_info" struct.
* Turn flag into an actual flag, rather than a counter.
* Close "fh" as soon as possible.
* Return early if flags != HP_HAVE_ALL.
* Remove dead code (d_name *always* contains a dash).
* Move static variables into the "entry_info" struct.
* Turn flag into an actual flag, rather than a counter.
* Close "fh" as soon as possible.
* Return early if flags != HP_HAVE_ALL.
* Remove dead code (d_name *always* contains a dash).
src/hugepages.c | diff | blob | history |