Date: Mon, 26 Jul 1999 04:57:27 -0400 (EDT) From: "Brian F. Feldman" <green@FreeBSD.org> To: Dag-Erling Smorgrav <des@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/inetd Makefile Message-ID: <Pine.BSF.4.10.9907260448450.17218-100000@janus.syracuse.net> In-Reply-To: <199907260843.BAA27665@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Jul 1999, Dag-Erling Smorgrav wrote:
> des 1999/07/26 01:43:03 PDT
>
> Modified files:
> usr.sbin/inetd Makefile
> Log:
> Pull on my asbestos undies and claim ownership of inetd to prevent further
> flamage between our beloved messrs Hearn and Feldman. Further commits go
> through me. I urge the contestants to direct their energies at cleaning
> up main() in inetd.c, which has over time become a crawling horror.
>
> Revision Changes Path
> 1.14 +2 -1 src/usr.sbin/inetd/Makefile
>
>
>
Here's one way to start cleaning it up: remove OLD_SETPROCTITLE cruft.
Problem: is this line right?
syslog(LOG_ERR, "pipe: %%m");
Another: (type *)0 should be NULL. Lots of those.
SWAP should die. typeof() is not portable.
turnon() is lame, and should be shot.
Lots more bogus casts. For instance:
sep = (struct servtab *)malloc(sizeof (*sep));
You aren't supposed to do a cast from a void pointer to a specific type;
it's implicit, and acceptable.
I'll take more time looking at it tomorrow, when it's not 5 AM.
Oh, here's another: MDAS. I see a
if (cnt * (CHTSIZE * CHTGRAN) / 60 > sep->se_maxcpm) {
and there are probably more bits of arith like that.
Brian Fundakowski Feldman _ __ ___ ____ ___ ___ ___
green@FreeBSD.org _ __ ___ | _ ) __| \
FreeBSD: The Power to Serve! _ __ | _ \._ \ |) |
http://www.FreeBSD.org/ _ |___/___/___/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9907260448450.17218-100000>
