improve getservbyname_r using new resolver backend
authorRich Felker <dalias@aerifal.cx>
Sun, 1 Jun 2014 04:45:04 +0000 (00:45 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 1 Jun 2014 04:45:04 +0000 (00:45 -0400)
commitaf7c308ee66c4127700dd7843f885f7f2d030a0c
tree02e103e0e40c463b367edae7cc3ae63840c4afdc
parente8f39ca4898237cf71657500f0b11534c47a0521
improve getservbyname_r using new resolver backend

now that host and service lookup have been separated in the backend,
there's no need for service lookup functions to pull in the host
lookup code. moreover, dynamic allocation is no longer needed, so this
function should now be async-signal-safe. it's also significantly
smaller.

one change in getservbyname is also made: knowing that getservbyname_r
needs only two character pointers in the caller-provided buffer, some
wasted bss can be avoided.
src/network/getservbyname.c
src/network/getservbyname_r.c