diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2023-12-01 15:45:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-01 15:45:59 +0200 |
commit | 096d1b1b2b455375e94738220acb49df847fb269 (patch) | |
tree | 3c3f2f85729cd0b9d14311e7935202fd98458188 /collectors/freebsd.plugin/freebsd_getmntinfo.c | |
parent | 41f39896755e1bb1fd4c009d1bb76c32220134bf (diff) |
Code cleanup (#16448)
* Code cleanup
* More cleanup
* More cleanup
* Use FILENAME_MAX
* query fix
Diffstat (limited to 'collectors/freebsd.plugin/freebsd_getmntinfo.c')
-rw-r--r-- | collectors/freebsd.plugin/freebsd_getmntinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/collectors/freebsd.plugin/freebsd_getmntinfo.c b/collectors/freebsd.plugin/freebsd_getmntinfo.c index 67840cc5f0..d55eb3d4a4 100644 --- a/collectors/freebsd.plugin/freebsd_getmntinfo.c +++ b/collectors/freebsd.plugin/freebsd_getmntinfo.c @@ -216,7 +216,7 @@ int do_getmntinfo(int update_every, usec_t dt) { (mntbuf[i].f_blocks > 2 || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) { if (unlikely(!m->st_space)) { - snprintfz(title, 4096, "Disk Space Usage for %s [%s]", + snprintfz(title, sizeof(title) - 1, "Disk Space Usage for %s [%s]", mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname); m->st_space = rrdset_create_localhost("disk_space", mntbuf[i].f_mntonname, @@ -254,7 +254,7 @@ int do_getmntinfo(int update_every, usec_t dt) { (mntbuf[i].f_files > 1 || netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) { if (unlikely(!m->st_inodes)) { - snprintfz(title, 4096, "Disk Files (inodes) Usage for %s [%s]", + snprintfz(title, sizeof(title) - 1, "Disk Files (inodes) Usage for %s [%s]", mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname); m->st_inodes = rrdset_create_localhost("disk_inodes", mntbuf[i].f_mntonname, |