]> arthur.barton.de Git - netdata.git/blobdiff - src/proc_self_mountinfo.c
freebsd coverity: 164810 Uninitialized scalar variable
[netdata.git] / src / proc_self_mountinfo.c
index 780c2af7af60b6e52932387667cb7dab4ac5e128..bb031a9ab40e808b0c8f26082806ac48cd5e6b9c 100644 (file)
@@ -293,7 +293,7 @@ struct mountinfo *mountinfo_read(int do_statvfs) {
 
                     struct mountinfo *mt;
                     for(mt = root; mt; mt = mt->next) {
-                        if(unlikely(mt->st_dev == mi->st_dev && !(mi->flags & MOUNTINFO_NO_STAT))) {
+                        if(unlikely(mt->st_dev == mi->st_dev && !(mt->flags & MOUNTINFO_IS_SAME_DEV))) {
                             if(strlen(mi->mount_point) < strlen(mt->mount_point))
                                 mt->flags |= MOUNTINFO_IS_SAME_DEV;
                             else
@@ -319,7 +319,7 @@ struct mountinfo *mountinfo_read(int do_statvfs) {
         }
 
         // check if it has size
-        if(do_statvfs) {
+        if(do_statvfs && !(mi->flags & MOUNTINFO_IS_DUMMY)) {
             struct statvfs buff_statvfs;
             if(unlikely(statvfs(mi->mount_point, &buff_statvfs) < 0)) {
                 mi->flags |= MOUNTINFO_NO_STAT;