From owner-cvs-all@FreeBSD.ORG Wed Jan 26 15:17:26 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B4FF16A4CE; Wed, 26 Jan 2005 15:17:26 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0406E43D45; Wed, 26 Jan 2005 15:17:26 +0000 (GMT) (envelope-from delphij@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0QFHPOi047711; Wed, 26 Jan 2005 15:17:25 GMT (envelope-from delphij@repoman.freebsd.org) Received: (from delphij@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0QFHPDh047710; Wed, 26 Jan 2005 15:17:25 GMT (envelope-from delphij) Message-Id: <200501261517.j0QFHPDh047710@repoman.freebsd.org> From: Xin LI Date: Wed, 26 Jan 2005 15:17:25 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.bin/fsync fsync.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2005 15:17:26 -0000 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