From: Ben Collins Date: Fri, 15 Sep 2000 03:04:04 +0000 (+0000) Subject: move some vars to where they are actually used to avoid compiler warnings X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1990 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9946e999c845e25227edca48bcf15c3ee9189323;p=openldap move some vars to where they are actually used to avoid compiler warnings --- diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index 371d8610dc..71dcd4be25 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -284,11 +284,9 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb, unsigned long address, int port, int async) { struct sockaddr_in sin; - struct in_addr in; ber_socket_t s = AC_SOCKET_INVALID; int rc, i, use_hp = 0; - struct hostent *hp, he_buf; - int local_h_errno; + struct hostent *hp = NULL; char *ha_buf=NULL, *p, *q; 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); return rc; #else + struct in_addr in; if (! inet_aton( host, &in) ) { + int local_h_errno; + struct hostent he_buf; rc = ldap_pvt_gethostbyname_a(host, &he_buf, &ha_buf, &hp, &local_h_errno);