[master] 718531c Make the size check work on arm/32bit
Poul-Henning Kamp
phk at FreeBSD.org
Mon Nov 14 08:58:05 CET 2016
commit 718531c591ae3d6b95fc7f19183fa5045f948f23
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Nov 14 07:57:02 2016 +0000
Make the size check work on arm/32bit
diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 086a779..994a255 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -600,7 +600,7 @@ parse_x_format(char *buf)
{
char *e, *r, *s;
int slt;
- long i;
+ intmax_t i;
if (!strcmp(buf, "Varnish:time_firstbyte")) {
addf_fragment(&CTX.frag[F_ttfb], "");
@@ -640,7 +640,7 @@ parse_x_format(char *buf)
if (r == buf || r[1] == ']')
VUT_Error(1, "Syntax error: VSL:%s", buf);
e[-1] = '\0';
- i = strtol(r + 1, &s, 10);
+ i = strtoimax(r + 1, &s, 10);
if (s != e - 1)
VUT_Error(1, "Syntax error: VSL:%s]", buf);
if (i <= 0)
@@ -650,7 +650,7 @@ parse_x_format(char *buf)
buf);
if (i > INT_MAX) {
VUT_Error(1,
- "Field specifier %ld for the tag VSL:%s]"
+ "Field specifier %jd for the tag VSL:%s]"
" is probably too high",
i, buf);
}
More information about the varnish-commit
mailing list