From: Ken Raeburn Date: Wed, 17 Oct 2001 22:35:04 +0000 (+0000) Subject: better version of last change X-Git-Tag: krb5-1.3-alpha1~1030 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e6243edd66e20cac29fdb4608b283ed9c647c0c7;p=krb5.git better version of last change git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13817 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 0d619d2ff..e708459d3 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -284,19 +284,7 @@ add_host_to_list (struct addrlist *lp, const char *hostname, a->ai_addr->sa_family = a->ai_family; #ifdef HAVE_SA_LEN if (a->ai_addr->sa_len == 0) - switch (a->ai_addr->sa_family) { - case AF_INET: - a->ai_addr->sa_len = sizeof (struct sockaddr_in); - break; -#ifdef KRB5_USE_INET6 - case AF_INET6: - a->ai_addr->sa_len = sizeof (struct sockaddr_in6); - break; -#endif - default: - /* oh well, we lose */ - break; - } + a->ai_addr->sa_len = a->ai_addrlen; #endif set_port_num (a->ai_addr, port);