summaryrefslogtreecommitdiffstats
path: root/usr.bin/sed/compile.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-07-09 21:31:03 +0000
committerderaadt <deraadt@openbsd.org>2002-07-09 21:31:03 +0000
commit52f0e374c0773332a655344c0d67cc3870307002 (patch)
treec9307801e3781680fb7a9a052a0386f1d1138313 /usr.bin/sed/compile.c
parentallow systrace to run in the background if possible so that the executed (diff)
downloadwireguard-openbsd-52f0e374c0773332a655344c0d67cc3870307002.tar.xz
wireguard-openbsd-52f0e374c0773332a655344c0d67cc3870307002.zip
make sed r command not bail out. try sed -e "/a/r"
vtamara@wimsey.informatik.uni-kl.de, pr 2755
Diffstat (limited to 'usr.bin/sed/compile.c')
-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++;