]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2794: ESI parsing fails on FreeBSD
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 8 Oct 2009 15:59:51 +0000 (17:59 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 8 Oct 2009 15:59:51 +0000 (17:59 +0200)
Fix bug in the ESI expression parser which prevented it from working properly on
non-glibc platforms.

src/esi/Expression.cc

index aaace55c3a988c27fe0fd8436ae9e09f4285e07b..8ec3f4fdf96a80b5a54033a5f4b45b32e2c9d3aa 100644 (file)
@@ -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) {