diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-25 14:11:30 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-25 14:11:30 +0000 |
commit | 4141519fb7f60b45e5a438bff710b80820adfe4d (patch) | |
tree | 7aac88c26efebc2dd4c35a3160d62d0d416fa181 /mdoc.c | |
parent | 1d17ea6790b69372d535d740e9db5aa20a30ca98 (diff) | |
download | mandoc-4141519fb7f60b45e5a438bff710b80820adfe4d.tar.gz |
Fix a minor optimization i broke in rev. 1.163 on August 20, 2010:
Do not bother looking into the hash table when the length of the macro
already tells us it's invalid. No functional change.
Noticed by jsg@, thanks!
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -865,7 +865,7 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int offs) mac[i] = '\0'; - tok = (i > 1 || i < 4) ? mdoc_hash_find(mac) : MDOC_MAX; + tok = (i > 1 && i < 4) ? mdoc_hash_find(mac) : MDOC_MAX; if (MDOC_MAX == tok) { mandoc_vmsg(MANDOCERR_MACRO, mdoc->parse, |