diff options
author | 2018-12-07 14:45:40 +0000 | |
---|---|---|
committer | 2018-12-07 14:45:40 +0000 | |
commit | 53ac6a98736caa25cfad2823dbdeb7652c21386d (patch) | |
tree | c0c9c26ccfaa2dcd963634d4b6f9596815a38993 | |
parent | properly handle EAI_NODATA and EAI_NONAME in fc-rdns lookups (diff) | |
download | wireguard-openbsd-53ac6a98736caa25cfad2823dbdeb7652c21386d.tar.xz wireguard-openbsd-53ac6a98736caa25cfad2823dbdeb7652c21386d.zip |
As an extension to POSIX, for consistency with our behaviour for
the "b" and "t" commands with a label, and for compatibility with
GNU sed, also accept ";" followed by another command after "b"
and "t" commands without a label: branch to the end of the script
instead of erroring out. Parsing is unchanged.
Missing feature reported by Lars dot Nooden at gmail dot com on bugs@.
OK martijn@ millert@
-rw-r--r-- | usr.bin/sed/compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index 64e31cd9b44..1ed9f979d12 100644 --- a/usr.bin/sed/compile.c +++ b/usr.bin/sed/compile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compile.c,v 1.49 2018/08/14 18:10:09 schwarze Exp $ */ +/* $OpenBSD: compile.c,v 1.50 2018/12/07 14:45:40 schwarze Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -284,7 +284,7 @@ nonsel: /* Now parse the command */ case BRANCH: /* b t */ p++; EATSPACE(); - if (*p == '\0') + if (*p == '\0' || *p == ';') cmd->t = NULL; else cmd->t = duptoeol(p, "branch", &p); |