...
This commit is contained in:
DarN
2021-04-28 07:10:55 +02:00
committed by GitHub
parent 4674d6c2fc
commit 99849ccd77
+2 -5
View File
@@ -14,11 +14,8 @@ static uint32_t get_num_elements(const char* dirname, int type) {
if(dirp == NULL)
return 0;
while((entry = readdir(dirp)) != NULL)
{
if(entry->d_type == DT_DIR && type == DT_DIR)
++num_elements;
else if(entry->d_type == DT_REG && type == DT_REG)
while((entry = readdir(dirp)) != NULL){
if(entry->d_type == type)
++num_elements;
}