Hacker News new | ask | show | jobs
by BenjiWiebe 358 days ago
Especially when the man page for readdir() mentions that you should set errno=0 if you want to distinguish errors from end-of-stream.

Not like setting errno=0 before calling readdir() is a novel idea...