Update getnameinfo.c, remove dead code, and fix error reporting.

Also add a unit test for the salen size checking.

Bug: 1889275
Change-Id: I8ec4107df9e2e9a8571e8915525249c6e44b98ad
5 files changed