* mdocml: Fix a minor optimization i broke in rev.
@ 2014-04-25 14:11 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-04-25 14:11 UTC (permalink / raw)
To: source
Log Message:
-----------
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!
Modified Files:
--------------
mdocml:
mdoc.c
Revision Data
-------------
Index: mdoc.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.c,v
retrieving revision 1.213
retrieving revision 1.214
diff -Lmdoc.c -Lmdoc.c -u -p -r1.213 -r1.214
--- mdoc.c
+++ mdoc.c
@@ -865,7 +865,7 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, c
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,
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-25 14:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25 14:11 mdocml: Fix a minor optimization i broke in rev schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).