From: Amos Jeffries Date: Tue, 27 Oct 2009 05:51:14 +0000 (+1300) Subject: Author: Francesco Chemolli X-Git-Tag: SQUID_3_0_STABLE20~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc1669b0408ebf8aa75b8af22036356bd34fd4be;p=thirdparty%2Fsquid.git Author: Francesco Chemolli Bug 2794: ESI parsing fails on FreeBSD Fix bug in the ESI expression parser which prevented it from working properly on non-glibc platforms. --- diff --git a/src/ESIExpression.cc b/src/ESIExpression.cc index 1607a3eff4..6d370c8c7c 100644 --- a/src/ESIExpression.cc +++ b/src/ESIExpression.cc @@ -721,6 +721,7 @@ getsymbol (const char *s, char const **endptr) if ((point = strchr (s, '.')) && point - s < (ssize_t)length) { /* floating point */ + errno=0; /* reset errno */ rv.value.floating = strtod (s, &end); if (s == end || errno) { @@ -737,6 +738,7 @@ getsymbol (const char *s, char const **endptr) } } else { /* INT */ + errno=0; /* reset errno */ rv.value.integral = strtol (s, &end, 0); if (s == end || errno) {