From owner-cvs-all Sun Nov 26 18:38:50 2000 Delivered-To: cvs-all@freebsd.org Received: from green.dyndns.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 752A837B479; Sun, 26 Nov 2000 18:38:45 -0800 (PST) Received: from localhost (87y9ni@localhost [127.0.0.1]) by green.dyndns.org (8.11.0/8.11.0) with ESMTP id eAR2ch578348; Sun, 26 Nov 2000 21:38:43 -0500 (EST) (envelope-from green@FreeBSD.org) Message-Id: <200011270238.eAR2ch578348@green.dyndns.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Alfred Perlstein Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/inetd builtins.c In-Reply-To: Message from Alfred Perlstein of "Sun, 26 Nov 2000 18:22:40 PST." <20001126182240.A8051@fw.wintelcom.net> From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 26 Nov 2000 21:38:43 -0500 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > * Brian F. Feldman [001126 13:40] wrote: > > Alfred Perlstein wrote: > > > Because your "fix" was a gross hack on top of the gross hack already > > > in place. > > > > Here, you can review this, then: > > > > Ok, a bit better. Why do you keep setting errno to 0 and then > testing against it? GETPWENT(3) says nothing about errno being > set, it might set errno through one of it's routines and not > clear it. Right: it preserves the value, "if possible". Since it's not defined whether or not it sets errno, this will either help by getting the value where possible or hurt by returning an errno from deep in the code that doesn't make sense. Since it's more deterministic to just use ENOENT, I guess it's fine either way :) > I've also simplified one of the tricky conditionals you had, > particularly the one that begins with 'if (getcredfail != 0)' > but you should just go over it one last time to make sure it's > correct. That makes sense. If there aren't objections, I'd like to commit this cleanup. The code seems as correct as possible, now. -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message