Date: Mon, 6 Jan 2003 12:42:38 -0800 (PST) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 23302 for review Message-ID: <200301062042.h06KgcpC004844@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=23302 Change 23302 by peter@peter_itanic2 on 2003/01/06 12:42:28 fix warnings. sigh. Why use a struct when you really want an int? Affected files ... .. //depot/projects/ia64/contrib/bind/bin/host/host.c#5 edit Differences ... ==== //depot/projects/ia64/contrib/bind/bin/host/host.c#5 (text+ko) ==== @@ -226,7 +226,7 @@ int main(int argc, char **argv) { struct sockaddr_storage addr; - struct hostent *hp; + int hp; char *s; int waitmode = 0; int ncnames, ch; @@ -383,7 +383,7 @@ } freeaddrinfo(answer); } - hp = NULL; + hp = 0; res.res_h_errno = TRY_AGAIN; /* * We handle default domains ourselves, thank you. @@ -393,10 +393,10 @@ if (list) exit(ListHosts(getdomain, querytype ? querytype : ns_t_a)); ncnames = 5; nkeychains = 18; - while (hp == NULL && res.res_h_errno == TRY_AGAIN) { + while (hp == 0 && res.res_h_errno == TRY_AGAIN) { if (!ip) { cname = NULL; - hp = (struct hostent *)gethostinfo(getdomain); + hp = gethostinfo(getdomain); getdomain[0] = 0; /* clear this query */ if (sigchase && (chase_step & SD_RR)) { if (nkeychains-- == 0) { @@ -437,21 +437,21 @@ sym_ntos(__p_type_syms, chase_type, NULL), getdomain); } - hp = NULL; + hp = 0; res.res_h_errno = TRY_AGAIN; continue; } } else { if (addrinfo(&addr) == 0) - hp = NULL; + hp = 0; else - hp = (struct hostent *)1; /* XXX */ + hp = 1; /* XXX */ } if (!waitmode) break; } - if (hp == NULL) { + if (hp == 0) { hperror(res.res_h_errno); exit(1); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301062042.h06KgcpC004844>