summaryrefslogtreecommitdiff
path: root/usr.bin/ypwhich
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-02 23:37:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-02 23:37:22 +0000
commit77100efdfb5a6025b3f998e0a989c5e39ec4893f (patch)
treea7dc691f7508eb3c5dc306036746d28eaaaef2b2 /usr.bin/ypwhich
parent8c484997b03e3e94f6c06c6496ba9826c86ef1bb (diff)
delete unused variable
Diffstat (limited to 'usr.bin/ypwhich')
-rw-r--r--usr.bin/ypwhich/ypwhich.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c
index c735a8cb66d..d4fa8e7cc45 100644
--- a/usr.bin/ypwhich/ypwhich.c
+++ b/usr.bin/ypwhich/ypwhich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypwhich.c,v 1.17 2006/04/02 01:49:19 deraadt Exp $ */
+/* $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,7 +28,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: ypwhich.c,v 1.17 2006/04/02 01:49:19 deraadt Exp $";
+static char rcsid[] = "$Id: ypwhich.c,v 1.18 2006/04/02 23:37:21 deraadt Exp $";
#endif
#include <sys/param.h>
@@ -138,14 +138,12 @@ int
main(int argc, char *argv[])
{
char *domain, *master, *map = NULL, *host = NULL;
- int notrans, mode, getmap, c, r, i;
+ int notrans = 0, mode = 0, 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");
@@ -195,8 +193,8 @@ main(int argc, char *argv[])
argv[0]);
exit(1);
}
- bcopy((char *)hent->h_addr,
- (char *)&sin.sin_addr, sizeof sin.sin_addr);
+ bcopy(hent->h_addr, &sin.sin_addr,
+ sizeof sin.sin_addr);
}
if (bind_host(domain, &sin))
exit(1);