summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-09 21:31:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-09 21:31:04 +0000
commit9adb62af86610e8941ab95bdb77be91c21865e4b (patch)
treede1741161b9f155651fa3b154caf41b61bdce0ba
parent7d6384b333a9b97f4d8ec808751d55c8ebc67672 (diff)
make sed r command not bail out. try sed -e "/a/r"
vtamara@wimsey.informatik.uni-kl.de, pr 2755
-rw-r--r--usr.bin/sed/compile.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c
index b14b392e24d..eba74937ced 100644
--- a/usr.bin/sed/compile.c
+++ b/usr.bin/sed/compile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: compile.c,v 1.12 2002/06/11 06:16:36 jsyn Exp $ */
+/* $OpenBSD: compile.c,v 1.13 2002/07/09 21:31:03 deraadt Exp $ */
/*-
* Copyright (c) 1992 Diomidis Spinellis.
@@ -39,7 +39,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)compile.c 8.2 (Berkeley) 4/28/95"; */
-static char *rcsid = "$OpenBSD: compile.c,v 1.12 2002/06/11 06:16:36 jsyn Exp $";
+static char *rcsid = "$OpenBSD: compile.c,v 1.13 2002/07/09 21:31:03 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -275,10 +275,7 @@ nonsel: /* Now parse the command */
case RFILE: /* r */
p++;
EATSPACE();
- if (*p == '\0')
- err(COMPILE, "filename expected");
- else
- cmd->t = duptoeol(p, "read command");
+ cmd->t = duptoeol(p, "read command");
break;
case BRANCH: /* b t */
p++;