]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r289837
authorvangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 19 Dec 2015 02:47:05 +0000 (02:47 +0000)
committervangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 19 Dec 2015 02:47:05 +0000 (02:47 +0000)
commit0240e04bb5a2cd08e089ba31498a363312a8462a
treeccd319472968730922602024f800851d55b6a63b
parent8d39f8608bc88f2a15beeaf3c2b7c341465f358c
MFC r289837

resolver: abuse _res a little less

In the past, _res was a global variable.  Now, it's multiple function calls.
Several functions in the resolver use _res multiple times and therefore
call the function(s) far more than necessary.

Fix those callers to store the result of _res in a local variable.

Add __noinline to the definition of res_init() to avoid the code bloat
that these changes would have otherwise incurred.  Thanks to jilles
for noticing this.

Sponsored by:   Dell Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@292463 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/resolv/res_data.c