C: optimized dir opening
This commit is contained in:
@ -287,7 +287,12 @@ int count_dir(char* dir_path)
|
||||
count++;
|
||||
}
|
||||
|
||||
closedir(fd);
|
||||
if (closedir(fd) < 0)
|
||||
{
|
||||
obi_set_errno(OBI_UTILS_ERROR);
|
||||
obidebug(1, "\nError closing a directory");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
Reference in New Issue
Block a user