summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-09-22 11:35:46 +0200
committerChristian Grothoff <christian@grothoff.org>2021-09-22 11:35:56 +0200
commit7bf37b7ea24929c277cd915de3eac24e728a6a1f (patch)
tree3e38fd70d0efd7b705faccbbf7fbbb077b6c65e2
parent658bceab7ba3aab5121e8874d8508264d3f63ce3 (diff)
NSE: return INF, not NaN (fixes #7021)
-rw-r--r--src/nse/gnunet-service-nse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 8e9cd0c9d..45ebae34c 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -390,7 +390,7 @@ setup_estimate_message (struct GNUNET_NSE_ClientMessage *em)
if (variance >= 0)
std_dev = sqrt (variance);
else
- std_dev = variance; /* must be infinity due to estimate_count == 0 */
+ std_dev = 1.0 / 0.0; /* return infinity due to estimate_count == 0 */
current_std_dev = std_dev;
current_size_estimate = mean;