=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ypmatch/ypmatch.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/ypmatch/ypmatch.c 1996/05/05 16:19:36 1.3 --- src/usr.bin/ypmatch/ypmatch.c 1996/05/10 13:03:14 1.4 *************** *** 1,5 **** ! /* $OpenBSD: ypmatch.c,v 1.3 1996/05/05 16:19:36 deraadt Exp $ */ ! /* $NetBSD: ypmatch.c,v 1.6 1996/04/30 22:58:31 jtc Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt --- 1,5 ---- ! /* $OpenBSD: ypmatch.c,v 1.4 1996/05/10 13:03:14 deraadt Exp $ */ ! /* $NetBSD: ypmatch.c,v 1.8 1996/05/07 01:24:52 jtc Exp $ */ /* * Copyright (c) 1992, 1993, 1996 Theo de Raadt *************** *** 34,40 **** */ #ifndef LINT ! static char rcsid[] = "$OpenBSD: ypmatch.c,v 1.3 1996/05/05 16:19:36 deraadt Exp $"; #endif #include --- 34,40 ---- */ #ifndef LINT ! static char rcsid[] = "$OpenBSD: ypmatch.c,v 1.4 1996/05/10 13:03:14 deraadt Exp $"; #endif #include *************** *** 85,90 **** --- 85,91 ---- extern int optind; int outbuflen, key, notrans; int c, r, i; + int rval; notrans = key = 0; yp_get_default_domain(&domainname); *************** *** 119,124 **** --- 120,127 ---- if( strcmp(inmap, ypaliases[i].alias) == 0) inmap = ypaliases[i].name; } + + rval = 0; for(; optind < argc-1; optind++) { inkey = argv[optind]; *************** *** 127,133 **** switch(r) { case 0: if(key) ! printf("%s ", inkey); printf("%*.*s\n", outbuflen, outbuflen, outbuf); break; case YPERR_YPBIND: --- 130,136 ---- switch(r) { case 0: if(key) ! printf("%s: ", inkey); printf("%*.*s\n", outbuflen, outbuflen, outbuf); break; case YPERR_YPBIND: *************** *** 136,143 **** default: fprintf(stderr, "Can't match key %s in map %s. Reason: %s\n", inkey, inmap, yperr_string(r)); ! exit(1); } } ! exit(0); } --- 139,147 ---- default: fprintf(stderr, "Can't match key %s in map %s. Reason: %s\n", inkey, inmap, yperr_string(r)); ! rval = 1; ! break; } } ! exit(rval); }