_close() should be called instead of close() here.

This commit is contained in:
Hajimu UMEMOTO 2006-08-04 10:21:11 +00:00
parent 776fc0e90e
commit 500fe2a19c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160965

View file

@ -77,6 +77,8 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
#include "namespace.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
@ -93,6 +95,8 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
#include <netdb.h>
#include "un-namespace.h"
#include "port_after.h"
/* ensure that sockaddr_in6 and IN6ADDR_ANY_INIT are declared / defined */
@ -735,13 +739,13 @@ res_nclose(res_state statp) {
int ns;
if (statp->_vcsock >= 0) {
(void) close(statp->_vcsock);
(void) _close(statp->_vcsock);
statp->_vcsock = -1;
statp->_flags &= ~(RES_F_VC | RES_F_CONN);
}
for (ns = 0; ns < statp->_u._ext.nscount; ns++) {
if (statp->_u._ext.nssocks[ns] != -1) {
(void) close(statp->_u._ext.nssocks[ns]);
(void) _close(statp->_u._ext.nssocks[ns]);
statp->_u._ext.nssocks[ns] = -1;
}
}