summaryrefslogtreecommitdiff
path: root/usr.bin/uniq/uniq.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/uniq/uniq.c')
-rw-r--r--usr.bin/uniq/uniq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c
index 5592c378d37..6437e8bfc7c 100644
--- a/usr.bin/uniq/uniq.c
+++ b/usr.bin/uniq/uniq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uniq.c,v 1.11 2002/12/08 06:40:44 millert Exp $ */
+/* $OpenBSD: uniq.c,v 1.12 2002/12/08 22:43:54 millert Exp $ */
/* $NetBSD: uniq.c,v 1.7 1995/08/31 22:03:48 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95";
#endif
-static char rcsid[] = "$OpenBSD: uniq.c,v 1.11 2002/12/08 06:40:44 millert Exp $";
+static char rcsid[] = "$OpenBSD: uniq.c,v 1.12 2002/12/08 22:43:54 millert Exp $";
#endif /* not lint */
#include <errno.h>
@@ -200,6 +200,8 @@ file(char *name, char *mode)
{
FILE *fp;
+ if (strcmp(name, "-") == 0)
+ return(*mode == 'r' ? stdin : stdout);
if ((fp = fopen(name, mode)) == NULL)
err(1, "%s", name);
return(fp);