Skip to contentSkip to conversation

libxl: correct strtod error check

PATCH In review Matthew Daley 2 participants 2 messages Nov 8, 2013 – Nov 11, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: correct strtod error check

---
 tools/libxl/libxl_json.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/libxl_json.c +1 -1
index c6ffb52..d2f7de8 100644
@@ -486,7 +486,7 @@ static int json_callback_number(void *opaque, const char *s, libxl_yajl_length l
     if (is_decimal(s, len)) {
         double d = strtod(s, NULL);
 
-        if ((d == HUGE_VAL || d == HUGE_VAL) && errno == ERANGE) {
+        if ((d == HUGE_VALF || d == HUGE_VALL) && errno == ERANGE) {
             goto error;
         }
 
Signature · 1 line
1.7.10.4