]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r289837
authorvangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 19 Dec 2015 02:35:32 +0000 (02:35 +0000)
committervangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 19 Dec 2015 02:35:32 +0000 (02:35 +0000)
commit076747778accd4e9db5b75a860e9b1c6da50157f
tree2a31724c03c6ae1e779ab9f067bacc2a6754a182
parentd1f7cd6b4cd3ed1af844cbc66acdecc86f099fd7
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/10@292461 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/resolv/res_data.c