aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-05-15 22:15:01 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-05-15 22:15:01 -0400
commit12cc299c65ba6124c7d459f2605404ad43909db3 (patch)
tree7923558883c4d054cb53fe72ec8978feb405aba3
parentf941d033296eb99eeac60f22fc70938893bf7a30 (diff)
downloadpostgresql-12cc299c65ba6124c7d459f2605404ad43909db3.tar.gz
postgresql-12cc299c65ba6124c7d459f2605404ad43909db3.zip
Avoid direct use of INFINITY.
It's not very portable. Per buildfarm.
-rw-r--r--src/backend/lib/bipartite_match.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/lib/bipartite_match.c b/src/backend/lib/bipartite_match.c
index 57d6d548cff..9c08b2895d1 100644
--- a/src/backend/lib/bipartite_match.c
+++ b/src/backend/lib/bipartite_match.c
@@ -21,7 +21,8 @@
#include "lib/bipartite_match.h"
#include "miscadmin.h"
-#include "utils/palloc.h"
+#include "utils/builtins.h"
+
static bool hk_breadth_search(BipartiteMatchState *state);
static bool hk_depth_search(BipartiteMatchState *state, int u, int depth);
@@ -87,7 +88,7 @@ hk_breadth_search(BipartiteMatchState *state)
int qtail = 0; /* so don't have to worry about wrapping */
int u;
- distance[0] = INFINITY;
+ distance[0] = get_float4_infinity();
for (u = 1; u <= usize; ++u)
{
@@ -97,7 +98,7 @@ hk_breadth_search(BipartiteMatchState *state)
queue[qhead++] = u;
}
else
- distance[u] = INFINITY;
+ distance[u] = get_float4_infinity();
}
while (qtail < qhead)
@@ -156,6 +157,6 @@ hk_depth_search(BipartiteMatchState *state, int u, int depth)
}
}
- distance[u] = INFINITY;
+ distance[u] = get_float4_infinity();
return false;
}