summaryrefslogtreecommitdiffstats
path: root/src/libnetdata/os.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libnetdata/os.c (renamed from libnetdata/os.c)6
1 files changed, 3 insertions, 3 deletions
diff --git a/libnetdata/os.c b/src/libnetdata/os.c
index e4624be69..51001aa25 100644
--- a/libnetdata/os.c
+++ b/src/libnetdata/os.c
@@ -151,11 +151,11 @@ unsigned long read_cpuset_cpus(const char *filename, long system_cpus) {
static size_t buf_size = 0;
if(!buf) {
- buf_size = 100U + 6 * system_cpus; // taken from kernel/cgroup/cpuset.c
- buf = mallocz(buf_size + 1);
+ buf_size = 100U + 6 * system_cpus + 1; // taken from kernel/cgroup/cpuset.c
+ buf = mallocz(buf_size);
}
- int ret = read_file(filename, buf, buf_size);
+ int ret = read_txt_file(filename, buf, buf_size);
if(!ret) {
char *s = buf;