You should check your return value of your opendir(). Also main() should return an int for correct coding practices.
Opendir() will open upto at least OPEN_MAX files and directories.
http://www.opengroup.org/onlinepubs/...h/opendir.html
You should check your return value of your opendir(). Also main() should return an int for correct coding practices.
Opendir() will open upto at least OPEN_MAX files and directories.
http://www.opengroup.org/onlinepubs/...h/opendir.html