Filesystem notification, part 2: A deeper investigation of inotify
Filesystem notification, part 2: A deeper investigation of inotify
Posted Aug 6, 2014 13:23 UTC (Wed) by poruid (guest, #15924)Parent article: Filesystem notification, part 2: A deeper investigation of inotify
Why is the call to exit() in the sample code put into an else branch when the if branch unconditionally executes a return?
Posted Aug 7, 2014 9:05 UTC (Thu)
by mkerrisk (subscriber, #1978)
[Link]
They're both equivalent, of course. The form I used feels slightly more natural (to me). If I'd done it the other way, I'd probably rather have written:
Filesystem notification, part 2: A deeper investigation of inotify
if (errno != ENOENT)
exit(EXIT_FAILURE);
return 0;