Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Jun 2001 18:26:52 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        Peter Pentchev <roam@orbitel.bg>
Cc:        audit@FreeBSD.org
Subject:   Re: rarpd(8) cleanup patch 
Message-ID:  <20010605012652.B06E63E31@bazooka.unixfreak.org>
In-Reply-To: <20010604161628.A20595@ringworld.oblivion.bg>; from roam@orbitel.bg on "Mon, 4 Jun 2001 16:16:28 %2B0300"

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Pentchev <roam@orbitel.bg> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010605012652.B06E63E31>