diff options
author | aiju <aiju@phicode.de> | 2011-07-13 14:38:49 +0200 |
---|---|---|
committer | aiju <aiju@phicode.de> | 2011-07-13 14:38:49 +0200 |
commit | f4617dc7db28cd75e73bbe0044aa6bfc6941bfe5 (patch) | |
tree | aac390936385702913955e87e9c8c56597d2e2e9 | |
parent | db0f050d2b65a5fe329cf9454720420cb2deb721 (diff) | |
download | plan9front-f4617dc7db28cd75e73bbe0044aa6bfc6941bfe5.tar.xz |
fixed bug in sed
-rw-r--r-- | sys/src/cmd/sed.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/src/cmd/sed.c b/sys/src/cmd/sed.c index aa603b4bd..96c3eb493 100644 --- a/sys/src/cmd/sed.c +++ b/sys/src/cmd/sed.c @@ -688,9 +688,11 @@ newfile(enum PTYPE type, char *name) { if (type == P_ARG) prog.curr = name; - else if ((prog.bp = Bopen(name, OREAD)) == 0) - quit("Cannot open pattern-file: %s\n", name); - Blethal(prog.bp, nil); + else { + if ((prog.bp = Bopen(name, OREAD)) == 0) + quit("Cannot open pattern-file: %s\n", name); + Blethal(prog.bp, nil); + } prog.type = type; } |