Subject: Re: scan_ffs from OpenBSD ported and improved.
To: Roland Illig <roland.illig@gmx.de>
From: Juan RP <juan@xtrarom.org>
List: tech-userlevel
Date: 06/06/2005 23:58:11
On Mon, 06 Jun 2005 17:17:22 +0200
Roland Illig <roland.illig@gmx.de> wrote:
> 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.
Ok.
> 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.
I thought PRI* definitions were already portable?
> 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.
Good point, I'll fix this.
> Use /* NOTREACHED */ after calls to err().
Why is not that explained in /usr/share/misc/style?
> In general, set WARNS=4 (or maybe 3) and check with lint(1). ;)
I had already set WARNS=4 here.