Code question (canohost.c)

John Devitofranceschi jdvf at optonline.net
Fri Apr 30 10:46:57 EST 2004


So, I looked at some older versions of the code and found that, indeed, a
NULL was sent as the second parameter in previous releases.

So, why the change? What does "0" buy you (besides a useless and costly call
to getservbyname()) that NULL does not?

jd


-----Original Message-----
From: openssh-unix-dev-bounces+jdvf=optonline.net at mindrot.org
[mailto:openssh-unix-dev-bounces+jdvf=optonline.net at mindrot.org] On Behalf
Of John Devitofranceschi
Sent: Tuesday, April 27, 2004 11:33 PM
To: openssh-unix-dev at mindrot.org
Subject: Code question (canohost.c)



In the latest release at around line 80 of canohost.c there is a call to
getaddrinfo (found in openbsd-compat/fake-rfc2553.c) where the second
parameter (it's supposed to be a service name, I suppose) is "0".  Why is
that? Shouldn't it be NULL?

I ask this because the resulting (seemingly useless and ultimately futile)
getservbyname("0", NULL) call is slowing down the time to login considerably
on my Openstep systems. Or does a call like this have a special meaning?

Thanks,
jd


_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev at mindrot.org
http://www.mindrot.org/mailman/listinfo/openssh-unix-dev





More information about the openssh-unix-dev mailing list