diff options
Diffstat (limited to 'contrib/bind/bin/named/ns_sort.c')
-rw-r--r-- | contrib/bind/bin/named/ns_sort.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/bind/bin/named/ns_sort.c b/contrib/bind/bin/named/ns_sort.c index 3b3f31e..6489c4d 100644 --- a/contrib/bind/bin/named/ns_sort.c +++ b/contrib/bind/bin/named/ns_sort.c @@ -1,6 +1,6 @@ #if !defined(lint) && !defined(SABER) static const char sccsid[] = "@(#)ns_sort.c 4.10 (Berkeley) 3/3/91"; -static const char rcsid[] = "$Id: ns_sort.c,v 8.6 2000/04/21 06:54:13 vixie Exp $"; +static const char rcsid[] = "$Id: ns_sort.c,v 8.8 2001/09/25 04:50:22 marka Exp $"; #endif /* not lint */ /* @@ -183,6 +183,7 @@ static const char rcsid[] = "$Id: ns_sort.c,v 8.6 2000/04/21 06:54:13 vixie Exp #include <stdio.h> #include <syslog.h> #include <resolv.h> +#include <string.h> #include <isc/eventlib.h> #include <isc/logging.h> @@ -240,6 +241,7 @@ sort_response(u_char *cp, u_char *eom, int ancount, struct sockaddr_in *from) { indirect = 1; break; default: + indirect = 0; panic("unexpected ime type in ip_match_address()", NULL); } @@ -282,6 +284,7 @@ sort_response(u_char *cp, u_char *eom, int ancount, struct sockaddr_in *from) { iml = imematch->next->u.indirect.list; break; default: + iml = NULL; panic("unexpected ime type in ip_match_address()", NULL); } @@ -303,9 +306,9 @@ sort_response(u_char *cp, u_char *eom, int ancount, struct sockaddr_in *from) { static int sort_rr(u_char *cp, u_char *eom, int ancount, ip_match_list iml) { - int type, class, dlen, n, c, distance, closest; + int type, class, dlen, n, c, distance, closest = 0; struct in_addr inaddr; - u_char *rr1 = NULL, *rrbest, *cpstart; + u_char *rr1 = NULL, *rrbest = NULL, *cpstart; rr1 = NULL; cpstart = cp; @@ -384,6 +387,7 @@ ip_match_address_elt(ip_match_list iml, struct in_addr address, indirect = 1; break; default: + indirect = 0; panic("unexpected ime type in ip_match_address()", NULL); } |