[master] 1193581 flexelint 743 Negative character constant

Nils Goroll nils.goroll at uplex.de
Thu Apr 5 10:08:09 UTC 2018


commit 1193581dd3abaf7e723c24452a54f408c17a2edc
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Apr 5 11:40:33 2018 +0200

    flexelint 743
    Negative character constant

diff --git a/bin/varnishd/cache/cache_esi_parse.c b/bin/varnishd/cache/cache_esi_parse.c
index ef72eeb..1c1f13a 100644
--- a/bin/varnishd/cache/cache_esi_parse.c
+++ b/bin/varnishd/cache/cache_esi_parse.c
@@ -616,7 +616,8 @@ VEP_Parse(struct vep_state *vep, const char *p, size_t l)
 		 */
 
 		if (vep->state == VEP_START) {
-			if (FEATURE(FEATURE_ESI_REMOVE_BOM) && *p == '\xeb') {
+			if (FEATURE(FEATURE_ESI_REMOVE_BOM) &&
+			    *p == (char)0xeb) {
 				vep->match = vep_match_bom;
 				vep->state = VEP_MATCH;
 			} else
@@ -638,7 +639,7 @@ VEP_Parse(struct vep_state *vep, const char *p, size_t l)
 			if (p < e && *p == '<') {
 				p++;
 				vep->state = VEP_STARTTAG;
-			} else if (p < e && *p == '\xeb') {
+			} else if (p < e && *p == (char)0xeb) {
 				VSLb(vep->vc->wrk->vsl, SLT_ESI_xmlerror,
 				    "No ESI processing, "
 				    "first char not '<' but BOM."


More information about the varnish-commit mailing list