diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2022-06-07 09:41:59 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2022-06-07 09:41:59 +0000 |
commit | b88fd10e9a00e06f98d28dae5b9b96149bff33ec (patch) | |
tree | f12d4770f8c96494509159fccca33cd1054dc58a | |
parent | a68560592d5f76c4cd7f5c45a184e0e6305600ec (diff) | |
download | mandoc-b88fd10e9a00e06f98d28dae5b9b96149bff33ec.tar.gz |
Purge duplicate error reporting from the .tr request parser:
the error was already reported earlier when roff_expand()
called roff_escape().
-rw-r--r-- | roff.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -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, |