]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
inf is null in json :-(
authorTobias Oetiker <tobi@oetiker.ch>
Sun, 24 Nov 2013 15:42:53 +0000 (16:42 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Sun, 24 Nov 2013 15:42:53 +0000 (16:42 +0100)
src/rrd_xport.c

index 4ecee042ae84a87c222b5d0aa81accec5077d887..22efe73538d2ece85275c1b00d831f40b501cfec 100644 (file)
@@ -769,7 +769,7 @@ int rrd_xport_format_xmljson(int flags,stringbuffer_t *buffer,image_desc_t *im,t
       rrd_value_t newval = DNAN;
       newval = *ptr;
       if (json){
-       if (isnan(newval)){
+       if (isnan(newval) || isinf(newval)){
          addToBuffer(buffer,"null",0);                        
        } else {
          snprintf(buf,sizeof(buf),"%0.10e",newval);