@cryptotaxi247 / netdata-1 / commits / 6da6cf810

diskstats: fix compiler warnings.

Simon Nagl committed May 19, 2016 at 23:19 UTC 6da6cf8103c9dfff93d04c80a1195ce005df1268
1 file changed +1 -2
src/proc_diskstats.c
+1 -2
@@ -89,12 +89,11 @@ struct disk *get_disk(unsigned long major, unsigned long minor) {
89 } else {
90 // find if it is a container
91 // by checking if /sys/dev/block/MAJOR:MINOR/slaves has entries
92 - int is_container = 0;
92 snprintfz(buffer, FILENAME_MAX, path_find_block_device, major, minor, "slaves/");
93 DIR *dirp = opendir(buffer);
94 if (dirp != NULL) {
95 struct dirent *dp;
97 - while(dp = readdir(dirp)) {
96 + while( (dp = readdir(dirp)) ) {
97 // . and .. are also files in empty folders.
98 if(strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0) {
99 continue;