move some vars to where they are actually used to avoid compiler warnings

This commit is contained in:
Ben Collins 2000-09-15 03:04:04 +00:00
parent 81d26d3ac0
commit 9946e999c8

View File

@ -284,11 +284,9 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb,
unsigned long address, int port, int async) unsigned long address, int port, int async)
{ {
struct sockaddr_in sin; struct sockaddr_in sin;
struct in_addr in;
ber_socket_t s = AC_SOCKET_INVALID; ber_socket_t s = AC_SOCKET_INVALID;
int rc, i, use_hp = 0; int rc, i, use_hp = 0;
struct hostent *hp, he_buf; struct hostent *hp = NULL;
int local_h_errno;
char *ha_buf=NULL, *p, *q; char *ha_buf=NULL, *p, *q;
osip_debug(ld, "ldap_connect_to_host\n",0,0,0); osip_debug(ld, "ldap_connect_to_host\n",0,0,0);
@ -352,7 +350,10 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb,
freeaddrinfo(res); freeaddrinfo(res);
return rc; return rc;
#else #else
struct in_addr in;
if (! inet_aton( host, &in) ) { if (! inet_aton( host, &in) ) {
int local_h_errno;
struct hostent he_buf;
rc = ldap_pvt_gethostbyname_a(host, &he_buf, &ha_buf, rc = ldap_pvt_gethostbyname_a(host, &he_buf, &ha_buf,
&hp, &local_h_errno); &hp, &local_h_errno);