diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-21 21:32:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-21 21:32:45 +0000 |
commit | a2741722b86bda2d2076ecaceecf926395ef47c0 (patch) | |
tree | 39b997a99746ea995bdec51d9d165ed5489d07f4 /usr.bin/ypcat/ypcat.c | |
parent | 1122d62a799cab0f1666caf090d1a64a2ea5e6e0 (diff) |
teeny cleanup
Diffstat (limited to 'usr.bin/ypcat/ypcat.c')
-rw-r--r-- | usr.bin/ypcat/ypcat.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/ypcat/ypcat.c b/usr.bin/ypcat/ypcat.c index c72e7150a77..f82937068a5 100644 --- a/usr.bin/ypcat/ypcat.c +++ b/usr.bin/ypcat/ypcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypcat.c,v 1.3 1996/05/05 16:19:31 deraadt Exp $ */ +/* $OpenBSD: ypcat.c,v 1.4 1996/05/21 21:32:40 deraadt Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com> @@ -33,7 +33,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypcat.c,v 1.3 1996/05/05 16:19:31 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ypcat.c,v 1.4 1996/05/21 21:32:40 deraadt Exp $"; #endif #include <sys/param.h> @@ -90,7 +90,7 @@ int main(argc, argv) char **argv; { - char *domain; + char *domain = NULL; struct ypall_callback ypcb; char *inmap; extern char *optarg; @@ -99,8 +99,6 @@ char **argv; int c, r, i; notrans = key = 0; - yp_get_default_domain(&domain); - while( (c=getopt(argc, argv, "xd:kt")) != -1) switch(c) { case 'x': @@ -125,6 +123,10 @@ char **argv; if(optind + 1 != argc ) usage(); + if (!domainname) { + yp_get_default_domain(&domainname); + } + inmap = argv[optind]; if (!notrans) { for(i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++) |