mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-06 12:20:15 +01:00
psql: Fix incorrect equality comparison
Commit 1a759c8327 contained an incorrect equality comparison
which was discovered by Coverity.
Reported-by: Ranier Vilela <ranier.vf@gmail.com>
Discussion: https://postgr.es/m/CAEudQApfAWzLo+oSuy2byXktdr7R8KJC_ACT5VV8fontrL35Pw@mail.gmail.com
This commit is contained in:
parent
081ec08e6a
commit
0f3604a518
|
|
@ -234,7 +234,7 @@ ParseVariableDouble(const char *value, const char *name, double *result, double
|
||||||
* too close to zero to have full precision, by checking for zero or real
|
* too close to zero to have full precision, by checking for zero or real
|
||||||
* out-of-range values.
|
* out-of-range values.
|
||||||
*/
|
*/
|
||||||
else if ((errno = ERANGE) &&
|
else if ((errno == ERANGE) &&
|
||||||
(dblval == 0.0 || dblval >= HUGE_VAL || dblval <= -HUGE_VAL))
|
(dblval == 0.0 || dblval >= HUGE_VAL || dblval <= -HUGE_VAL))
|
||||||
{
|
{
|
||||||
if (name)
|
if (name)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user