From owner-freebsd-audit Mon Jun 4 18:26:55 2001 Delivered-To: freebsd-audit@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 46B3037B401 for ; Mon, 4 Jun 2001 18:26:53 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id B06E63E31; Mon, 4 Jun 2001 18:26:52 -0700 (PDT) To: Peter Pentchev Cc: audit@FreeBSD.org Subject: Re: rarpd(8) cleanup patch In-Reply-To: <20010604161628.A20595@ringworld.oblivion.bg>; from roam@orbitel.bg on "Mon, 4 Jun 2001 16:16:28 +0300" Date: Mon, 04 Jun 2001 18:26:52 -0700 From: Dima Dorfman Message-Id: <20010605012652.B06E63E31@bazooka.unixfreak.org> Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Pentchev writes: > At http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd.patch > there is a patch that does the following: > - remove 'register' keywords; > - add 'const' to a couple of strings; > - add prototypes for several missed functions; > - several int/u_int/unsigned/long/format cleanups for WARNS=2; > - mdoc(7) cleanup for the rarpd.8 manpage. Couple of comments: * Kris said WARNS should be set like this: "WARNS?= 2" to allow overriding. * main() doesn't have to be prototyped. GCC complains about it right now; I've posted a patch to it which will shut it up in this case, and obrien said he'd commit it but apparently hasn't gotten around to it yet. * The function prototypes at the top should be in alphabetical order. * style(9) says that there shouldn't be a space after a cast. I.e., this: (int) sizeof(fish) is wrong. It should be: (int)sizeof(fish) Other than that, this looks good. > Functions and prototypes were left in K&R style, although an ANSIfication > would make the next change a lot easier. Should I ansify the lot? I'd say so. ANSI is preferred, so it isn't worth the trouble to support K&R if you have to go out of your way. stlye(9) says you shouldn't break support for it gratuitously, but I think support for varargs.h in new code is a little too much :-). > In addition, http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd-d.patch > adds a command-line flag, -d, that makes rarpd(8) send diagnostic messages > to stdout, error messages to stderr. This is quite useful when running > rarpd(8) under some kind of service monitoring script, e.g. supervise/svscan > from DJB's daemontools package. This one looks good, too, the above comments notwithstanding. Regards, Dima Dorfman dima@unixfreak.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message