=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/asa/Attic/asa.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/asa/Attic/asa.c 1996/06/26 05:31:25 1.2 +++ src/usr.bin/asa/Attic/asa.c 1998/07/20 19:57:17 1.3 @@ -1,4 +1,4 @@ -/* $OpenBSD: asa.c,v 1.2 1996/06/26 05:31:25 deraadt Exp $ */ +/* $OpenBSD: asa.c,v 1.3 1998/07/20 19:57:17 deraadt Exp $ */ /* $NetBSD: asa.c,v 1.10 1995/04/21 03:01:41 cgd Exp $ */ /* @@ -32,7 +32,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: asa.c,v 1.2 1996/06/26 05:31:25 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: asa.c,v 1.3 1998/07/20 19:57:17 deraadt Exp $"; #endif #include @@ -51,18 +51,19 @@ /* skip progname */ argv++; - fp = stdin; - do { - if (*argv) { - if (!(fp = fopen(*argv, "r"))) { + fp = stdin; + do { + if (*argv) { + if (!(fp = fopen(*argv, "r"))) { warn ("%s", *argv); continue; - } - } - asa (fp); - if (fp != stdin) - (void)fclose(fp); - } while (*argv++); + } + } + if (fp) + asa (fp); + if (fp && fp != stdin) + (void)fclose(fp); + } while (*argv++); exit (0); }