From owner-cvs-all Mon Jul 26 1:58:55 1999 Delivered-To: cvs-all@freebsd.org Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (Postfix) with ESMTP id 5CACE152DF; Mon, 26 Jul 1999 01:58:50 -0700 (PDT) (envelope-from green@FreeBSD.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.9.2/8.8.7) with ESMTP id EAA17551; Mon, 26 Jul 1999 04:57:28 -0400 (EDT) X-Authentication-Warning: janus.syracuse.net: green owned process doing -bs Date: Mon, 26 Jul 1999 04:57:27 -0400 (EDT) From: "Brian F. Feldman" X-Sender: green@janus.syracuse.net To: Dag-Erling Smorgrav Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/inetd Makefile In-Reply-To: <199907260843.BAA27665@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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