diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-06-07 09:41:23 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-06-07 09:41:23 +0000 |
commit | d187dc2dfb418354570da2b2177b5345bdae66f0 (patch) | |
tree | 5b3c05348e9b5b0cb9214d1b3185de073df6c08f /usr.bin/mandoc/roff.c | |
parent | 64dee919109143ca963f03c89a79cf9e83a537fc (diff) |
Purge duplicate error reporting from the .tr request parser:
the error was already reported earlier when roff_expand()
called roff_escape().
Diffstat (limited to 'usr.bin/mandoc/roff.c')
-rw-r--r-- | usr.bin/mandoc/roff.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index 0301b838565..856adb9ae57 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff.c,v 1.265 2022/06/03 11:50:25 schwarze Exp $ */ +/* $OpenBSD: roff.c,v 1.266 2022/06/07 09:41:22 schwarze Exp $ */ /* * Copyright (c) 2010-2015, 2017-2022 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> @@ -3738,7 +3738,6 @@ roff_tr(ROFF_ARGS) { const char *p, *first, *second; size_t fsz, ssz; - enum mandoc_esc esc; p = buf->buf + pos; @@ -3752,23 +3751,15 @@ roff_tr(ROFF_ARGS) first = p++; if (*first == '\\') { - esc = mandoc_escape(&p, NULL, NULL); - if (esc == ESCAPE_ERROR) { - mandoc_msg(MANDOCERR_ESC_BAD, ln, - (int)(p - buf->buf), "%s", first); + if (mandoc_escape(&p, NULL, NULL) == ESCAPE_ERROR) return ROFF_IGN; - } fsz = (size_t)(p - first); } second = p++; if (*second == '\\') { - esc = mandoc_escape(&p, NULL, NULL); - if (esc == ESCAPE_ERROR) { - mandoc_msg(MANDOCERR_ESC_BAD, ln, - (int)(p - buf->buf), "%s", second); + if (mandoc_escape(&p, NULL, NULL) == ESCAPE_ERROR) return ROFF_IGN; - } ssz = (size_t)(p - second); } else if (*second == '\0') { mandoc_msg(MANDOCERR_TR_ODD, ln, |