=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ypwhich/ypwhich.c,v retrieving revision 1.17 retrieving revision 1.18 diff -c -r1.17 -r1.18 *** src/usr.bin/ypwhich/ypwhich.c 2006/04/02 01:49:19 1.17 --- src/usr.bin/ypwhich/ypwhich.c 2006/04/02 23:37:21 1.18 *************** *** 1,4 **** ! /* $OpenBSD: ypwhich.c,v 1.17 2006/04/02 01:49:19 deraadt Exp $ */ /* $NetBSD: ypwhich.c,v 1.6 1996/05/13 02:43:48 thorpej Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: ypwhich.c,v 1.18 2006/04/02 23:37:21 deraadt Exp $ */ /* $NetBSD: ypwhich.c,v 1.6 1996/05/13 02:43:48 thorpej Exp $ */ /* *************** *** 28,34 **** */ #ifndef lint ! static char rcsid[] = "$Id: ypwhich.c,v 1.17 2006/04/02 01:49:19 deraadt Exp $"; #endif #include --- 28,34 ---- */ #ifndef lint ! static char rcsid[] = "$Id: ypwhich.c,v 1.18 2006/04/02 23:37:21 deraadt Exp $"; #endif #include *************** *** 138,151 **** main(int argc, char *argv[]) { char *domain, *master, *map = NULL, *host = NULL; ! int notrans, mode, getmap, c, r, i; struct ypmaplist *ypml, *y; struct sockaddr_in sin; struct hostent *hent; CLIENT *client = NULL; - getmap = notrans = mode = 0; - yp_get_default_domain(&domain); if (domain == NULL) errx(1, "YP domain name not set"); --- 138,149 ---- main(int argc, char *argv[]) { char *domain, *master, *map = NULL, *host = NULL; ! int notrans = 0, mode = 0, c, r, i; struct ypmaplist *ypml, *y; struct sockaddr_in sin; struct hostent *hent; CLIENT *client = NULL; yp_get_default_domain(&domain); if (domain == NULL) errx(1, "YP domain name not set"); *************** *** 195,202 **** argv[0]); exit(1); } ! bcopy((char *)hent->h_addr, ! (char *)&sin.sin_addr, sizeof sin.sin_addr); } if (bind_host(domain, &sin)) exit(1); --- 193,200 ---- argv[0]); exit(1); } ! bcopy(hent->h_addr, &sin.sin_addr, ! sizeof sin.sin_addr); } if (bind_host(domain, &sin)) exit(1);