Date: Wed, 26 Jan 2005 15:17:25 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/fsync fsync.c Message-ID: <200501261517.j0QFHPDh047710@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
delphij 2005-01-26 15:17:25 UTC FreeBSD src repository Modified files: usr.bin/fsync fsync.c Log: Correct some style nits that I have mistakenly submitted as suggestions which result in the last revision[*]: - style(9) and sysexits(3) suggests that we use EX_* as exit values, instead of some other values like those returned from a system call as errno. Additionally, follow Ruslan's suggestion about style(9) and other style improvements: - Since open(2) says that it returns -1 on errors, explicitly determine whether it is returning -1 rather than whether the return value is less than zero. - Only set rval when there is no previous error. This distinguishes the first error that occours. - Use exit() in favor of return in main(), this is suggested in old style(9), while the evolve has fade the suggestion. - Add some NOTREACHED comments. - Add blank line after first { because no local variables in usage() Thanks to Ruslan for his tireless explaining of the code standards and knowledge of the history of style(9). [*] Pointy hat to: me Submitted by: ru (with some minor changes) Discussed with: ru, ssouhlal Revision Changes Path 1.7 +15 -9 src/usr.bin/fsync/fsync.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501261517.j0QFHPDh047710>