From: Tobias Oetiker Date: Sun, 24 Nov 2013 15:42:53 +0000 (+0100) Subject: inf is null in json :-( X-Git-Tag: v1.5.0-rc1~147 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1dfa5ad6cd80322de76b1bb4bf58740fe2d2698;p=thirdparty%2Frrdtool-1.x.git inf is null in json :-( --- diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 4ecee042..22efe735 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -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);