Subject: Re: scan_ffs from OpenBSD ported and improved.
To: None <tech-userlevel@netbsd.org>
From: Roland Illig <roland.illig@gmx.de>
List: tech-userlevel
Date: 06/06/2005 17:17:22
Juan RP wrote:
> Please test and review, I'd want to commit this on the next days if there isn't
> any objection.
The $NetBSD$ tag should be in the first line. The "import" Ids should
follow then in reversed order (which is irrelevant here).
/* $NetBSD$ */
/* OpenBSD ... */
It's just like in the mail headers ...
As Julio already said, make all variables and functions "static" if
possible. It's a completely other namespace than for "extern" ones.
In calls to printf(3), explicitly cast the PRIu64 arguments to uint64_t.
Just for portability. Or find someone who guarantees that daddr_t will
always be (and stay) equivalent to uint64_t.
Make LABELS and VERBOSE into an enum. Invent another name as a
replacement for literal 0. (A literal 0 could mean almost anything in a
C program.)
An empty line between declarations and code could be useful.
Use /* NOTREACHED */ after calls to err().
In general, set WARNS=4 (or maybe 3) and check with lint(1). ;)
Roland