Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Nov 2000 21:38:43 -0500
From:      "Brian F. Feldman" <green@FreeBSD.org>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/inetd builtins.c 
Message-ID:  <200011270238.eAR2ch578348@green.dyndns.org>
In-Reply-To: Message from Alfred Perlstein <bright@wintelcom.net>  of "Sun, 26 Nov 2000 18:22:40 PST." <20001126182240.A8051@fw.wintelcom.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein <bright@wintelcom.net> wrote:
> * Brian F. Feldman <green@FreeBSD.org> [001126 13:40] wrote:
> > Alfred Perlstein <bright@wintelcom.net> 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




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