Subject: Re: lib/35403: Error code path optimization in libc's implementation of uname()
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Martin Husemann <martin@duskware.de>
List: netbsd-bugs
Date: 01/11/2007 10:25:03
The following reply was made to PR lib/35403; it has been noted by GNATS.
From: Martin Husemann <martin@duskware.de>
To: Pierre Pronchery <khorben@defora.org>
Cc: lib-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: lib/35403: Error code path optimization in libc's implementation of uname()
Date: Thu, 11 Jan 2007 11:23:17 +0100
On Thu, Jan 11, 2007 at 01:50:00AM +0000, Pierre Pronchery wrote:
> It would be even more efficient to directly return in case of
> errors in this function, since it can make up to four useless other
> calls to sysctl() in this situation.
I could see a point doing this for the first sysctl - but if we touch the
utsname argument, we should not leave it half-initialized, IMHO.
I can not see any reason for this sysctl to fail though, so this change
hardly matters.
Martin