From owner-p4-projects Mon Jan 6 12:42:44 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A1C8937B401; Mon, 6 Jan 2003 12:42:40 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7CF137B413 for ; Mon, 6 Jan 2003 12:42:39 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68E5243EA9 for ; Mon, 6 Jan 2003 12:42:39 -0800 (PST) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h06Kgdfh004848 for ; Mon, 6 Jan 2003 12:42:39 -0800 (PST) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h06KgcpC004844 for perforce@freebsd.org; Mon, 6 Jan 2003 12:42:38 -0800 (PST) Date: Mon, 6 Jan 2003 12:42:38 -0800 (PST) Message-Id: <200301062042.h06KgcpC004844@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 23302 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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