Hi Xin Li, Is there a reason to prefer exit() over returning from main? I have not surveyed the source tree, but I suspect most programs in base exit by returning from main rather than explicit exit(3).
Thanks, Conrad On Mon, Dec 2, 2019 at 11:03 PM Xin LI <delp...@freebsd.org> wrote: > > Author: delphij > Date: Tue Dec 3 07:03:25 2019 > New Revision: 355318 > URL: https://svnweb.freebsd.org/changeset/base/355318 > > Log: > Explicitly exit() instead of return in main(). > > MFC after: 2 weeks > > Modified: > head/sbin/newfs_msdos/newfs_msdos.c > > Modified: head/sbin/newfs_msdos/newfs_msdos.c > ============================================================================== > --- head/sbin/newfs_msdos/newfs_msdos.c Tue Dec 3 07:01:28 2019 > (r355317) > +++ head/sbin/newfs_msdos/newfs_msdos.c Tue Dec 3 07:03:25 2019 > (r355318) > @@ -189,7 +189,7 @@ main(int argc, char *argv[]) > err(1, NULL); > } > dtype = *argv; > - return !!mkfs_msdos(fname, dtype, &o); > + exit(!!mkfs_msdos(fname, dtype, &o)); > } > > /* _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"