From: Francesco Chemolli Date: Thu, 8 Oct 2009 15:59:51 +0000 (+0200) Subject: Bug 2794: ESI parsing fails on FreeBSD X-Git-Tag: SQUID_3_2_0_1~660 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c822f9f0de098eb5b2033e78ac60854d50bdc60a;p=thirdparty%2Fsquid.git 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/esi/Expression.cc b/src/esi/Expression.cc index aaace55c3a..8ec3f4fdf9 100644 --- a/src/esi/Expression.cc +++ b/src/esi/Expression.cc @@ -714,6 +714,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) { @@ -730,6 +731,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) {