Reverted 5e08784b5c3b77ee4db15ac4e3602d3d740e638f. There are unwanted changes, for instance for closedir. The use-retval should only be used when it's pointless to call the function without taking the return value.