summaryrefslogtreecommitdiffstats
path: root/src/proc_net_dev.c
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2016-05-25 10:36:24 +0000
committerLennart Weller <lhw@ring0.de>2016-05-25 10:36:24 +0000
commitb4f64f72a3e4bf590c60b0cbd6cd365aa1a58542 (patch)
treee6706c727a1fedb44da614453ad3e429a7403a9b /src/proc_net_dev.c
parentImported Upstream version 1.1.0 (diff)
downloadnetdata-b4f64f72a3e4bf590c60b0cbd6cd365aa1a58542.tar.xz
netdata-b4f64f72a3e4bf590c60b0cbd6cd365aa1a58542.zip
Imported Upstream version 1.2.0upstream/1.2.0
Diffstat (limited to 'src/proc_net_dev.c')
-rw-r--r--src/proc_net_dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/proc_net_dev.c b/src/proc_net_dev.c
index 5070ab817..12d8078c7 100644
--- a/src/proc_net_dev.c
+++ b/src/proc_net_dev.c
@@ -20,7 +20,7 @@ int do_proc_net_dev(int update_every, unsigned long long dt) {
if(!ff) {
char filename[FILENAME_MAX + 1];
- snprintf(filename, FILENAME_MAX, "%s%s", global_host_prefix, "/proc/net/dev");
+ snprintfz(filename, FILENAME_MAX, "%s%s", global_host_prefix, "/proc/net/dev");
ff = procfile_open(config_get("plugin:proc:/proc/net/dev", "filename to monitor", filename), " \t,:|", PROCFILE_FLAG_DEFAULT);
}
if(!ff) return 1;
@@ -86,7 +86,7 @@ int do_proc_net_dev(int update_every, unsigned long long dt) {
// check if the user wants it
{
char var_name[512 + 1];
- snprintf(var_name, 512, "plugin:proc:/proc/net/dev:%s", iface);
+ snprintfz(var_name, 512, "plugin:proc:/proc/net/dev:%s", iface);
default_enable = config_get_boolean_ondemand(var_name, "enabled", default_enable);
if(default_enable == CONFIG_ONDEMAND_NO) continue;
if(default_enable == CONFIG_ONDEMAND_ONDEMAND && !rbytes && !tbytes) continue;