From: John Kohl Date: Thu, 29 Mar 1990 15:59:42 +0000 (+0000) Subject: use standard error return status X-Git-Tag: krb5-1.0-alpha2~960 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f877cfc700f9fd1082758d531f0d4dda1bb6eebc;p=krb5.git use standard error return status git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@428 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 009a0c844..70fe350e5 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -25,18 +25,20 @@ static char rcsid_locate_kdc_c[] = #include #ifdef KRB5_USE_INET #include +#define KRB5_UDP_PORT htons(8973) /* XXX */ #endif #include -#define KRB5_UDP_PORT 8973 /* XXX */ /* * returns count of number of addresses found */ -int krb5_locate_kdc(realm, addr_pp) +krb5_error_code +krb5_locate_kdc(realm, addr_pp, naddrs) krb5_data *realm; struct sockaddr **addr_pp; + int *naddrs; { char **hostlist; int code; @@ -54,8 +56,10 @@ int krb5_locate_kdc(realm, addr_pp) ; count = i; - if (count == 0) + if (count == 0) { + *naddrs = 0; return 0; + } addr_p = (struct sockaddr *)malloc (sizeof (struct sockaddr) * count); @@ -96,5 +100,6 @@ int krb5_locate_kdc(realm, addr_pp) * "can't find any KDC names" */ *addr_pp = addr_p; - return out; + *naddrs = out; + return 0; }