]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Optimize prev. commit for speed.
authorache <ache@FreeBSD.org>
Wed, 3 Oct 2012 04:46:58 +0000 (04:46 +0000)
committerache <ache@FreeBSD.org>
Wed, 3 Oct 2012 04:46:58 +0000 (04:46 +0000)
commitcbaa91b07562a45d7a37b3fbaba57b77cbe94468
tree95069d0b688fbfba33a5138446e584e2e06eb02a
parentd142b7417c2aa871313728dddcbf50ce59f963b0
Optimize prev. commit for speed.
1) Don't iterate the loop from the environment array beginning each time,
iterate it under the last place we deactivate instead.
2) Call __rebuild_environ() not on each iteration but once, only at the end
of whole loop (of course, only in case if something is changed).

MFC after:      1 week
lib/libc/stdlib/getenv.c