sync code from webdump - grabtitle - stupid HTML title grabber
HTML git clone git://git.codemadness.org/grabtitle
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit c09c55c8f71ef8c6e1ef6ad4aef514b2e7a077f3
DIR parent 4fae8cbe5b9ae3180da8ed9ae57bdc1a1559ab93
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 14 Jul 2026 16:40:05 +0200
sync code from webdump
removes false-positive warning in clang analyzer.
Diffstat:
M grabtitle.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
DIR diff --git a/grabtitle.c b/grabtitle.c
@@ -65,11 +65,15 @@ getnext_literal(void)
}
}
- for (; *ignorestate; ignorestate++) {
- if ((c = getnext()) == EOF)
- return EOF;
- if (TOLOWER((unsigned char)c) != TOLOWER((unsigned char)*ignorestate))
- break;
+ if (*ignorestate) {
+ for (; *ignorestate; ignorestate++) {
+ if ((c = getnext()) == EOF)
+ return EOF;
+ if (TOLOWER((unsigned char)c) != TOLOWER((unsigned char)*ignorestate))
+ break;
+ }
+ } else {
+ c = EOF; /* cannot happen, endtagmatch should be set (not empty) */
}
/* typical case: regular character */