getaddrinfo.c: fix incorrect check for ERANGE from gethostbyaddr_r
getaddrinfo.c: fix incorrect check for ERANGE from gethostbyaddr_r

Also, freeaddrinfo(NULL) is ok, no need to check parameted for NULL
before calling it.

Signed-off-by: Denys Vlasenko <50fbbd36fe0f9c8261d4a3c762c8c29ffb35e48f@redhat.com>

majek/uclibc-vx32,m-labs/uclibc-lm32,czankel/xtensa-uclibc,m-labs/uclibc-lm32,waweber/uclibc-clang,majek/uclibc-vx32,ndmsystems/uClibc,kraj/uclibc-ng,skristiansson/uClibc-or1k,atgreen/uClibc-moxie,ndmsystems/uClibc,hjl-tools/uClibc,groundwater/uClibc,hwoarang/uClibc,majek/uclibc-vx32,wbx-github/uclibc-ng,atgreen/uClibc-moxie,kraj/uClibc,wbx-github/uclibc-ng,mephi42/uClibc,ffainelli/uClibc,wbx-github/uclibc-ng,kraj/uclibc-ng,groundwater/uClibc,groundwater/uClibc,ffainelli/uClibc,foss-xtensa/uClibc,skristiansson/uClibc-or1k,kraj/uclibc-ng,ysat0/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,m-labs/uclibc-lm32,brgl/uclibc-ng,waweber/uclibc-clang,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,foss-for-synopsys-dwc-arc-processors/uClibc,atgreen/uClibc-moxie,brgl/uclibc-ng,ddcc/klee-uclibc-0.9.33.2,wbx-github/uclibc-ng,czankel/xtensa-uclibc,hwoarang/uClibc,brgl/uclibc-ng,ddcc/klee-uclibc-0.9.33.2,hjl-tools/uClibc,hwoarang/uClibc,kraj/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,mephi42/uClibc,kraj/uclibc-ng,skristiansson/uClibc-or1k,ffainelli/uClibc,atgreen/uClibc-moxie,majek/uclibc-vx32,hjl-tools/uClibc,foss-xtensa/uClibc,waweber/uclibc-clang,mephi42/uClibc,hjl-tools/uClibc,ndmsystems/uClibc,foss-xtensa/uClibc,kraj/uClibc,mephi42/uClibc,foss-xtensa/uClibc,hwoarang/uClibc,ffainelli/uClibc,czankel/xtensa-uclibc,groundwater/uClibc,ysat0/uClibc,brgl/uclibc-ng,ysat0/uClibc,ddcc/klee-uclibc-0.9.33.2,czankel/xtensa-uclibc,hjl-tools/uClibc,waweber/uclibc-clang,ysat0/uClibc,kraj/uClibc,ndmsystems/uClibc,skristiansson/uClibc-or1k,m-labs/uclibc-lm32,groundwater/uClibc