summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-06-07 09:41:59 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-06-07 09:41:59 +0000
commitb88fd10e9a00e06f98d28dae5b9b96149bff33ec (patch)
treef12d4770f8c96494509159fccca33cd1054dc58a /roff.c
parenta68560592d5f76c4cd7f5c45a184e0e6305600ec (diff)
downloadmandoc-b88fd10e9a00e06f98d28dae5b9b96149bff33ec.tar.gz
Purge duplicate error reporting from the .tr request parser:
the error was already reported earlier when roff_expand() called roff_escape().
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/roff.c b/roff.c
index 785097b6..f3565f85 100644
--- a/roff.c
+++ b/roff.c
@@ -3740,7 +3740,6 @@ roff_tr(ROFF_ARGS)
{
const char *p, *first, *second;
size_t fsz, ssz;
- enum mandoc_esc esc;
p = buf->buf + pos;
@@ -3754,23 +3753,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,