On Sun, Aug 30, 2015 at 12:18:12PM -0600, Theo de Raadt wrote: > In a more complex program with a large main() function, a call to > exit() is an explicit statement about termination, so that even if > someone refactors code to a subfunction, they must consider that > it carefully. > > The return is not as explicit.
In general these are error conditions. We can accept exit() there just like err() etc. 12 out of these bin/ programs in this patch call exit() right at the end of main, as the very last line. I think it's still worth it to cover these obvious cases, i.e. successful termination. Makes them rather easy to review (and test), too. Tobias