]> granicus.if.org Git - libexpat/commitdiff
Comment change: exclude paranoia check from coverage
authorRhodri James <rhodri@kynesim.co.uk>
Fri, 16 Jun 2017 18:09:17 +0000 (19:09 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Sat, 22 Jul 2017 20:49:20 +0000 (22:49 +0200)
expat/lib/xmltok_impl.c

index aee03502df1662b9277393741a1acac77126abd6..1e7f980dbf9bdbc9c351133900d4cbd741afc112 100644 (file)
@@ -1264,8 +1264,14 @@ PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr,
   const char *start;
   if (ptr >= end)
     return XML_TOK_NONE;
-  else if (! HAS_CHAR(enc, ptr, end))
-    return XML_TOK_PARTIAL;
+  else if (! HAS_CHAR(enc, ptr, end)) {
+    /* This line cannot be executed.  The incoming data has already
+     * been tokenized once, so incomplete characters like this have
+     * already been eliminated from the input.  Retaining the paranoia
+     * check is still valuable, however.
+     */
+    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
+  }
   start = ptr;
   while (HAS_CHAR(enc, ptr, end)) {
     switch (BYTE_TYPE(enc, ptr)) {