1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

Fixed all elog related warnings, as well as a few others.

This commit is contained in:
Peter Eisentraut
2000-01-15 02:59:43 +00:00
parent 7c9390caa1
commit 1cd4c14116
42 changed files with 184 additions and 182 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.51 1999/12/20 02:15:35 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.52 2000/01/15 02:59:37 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -830,10 +830,10 @@ dtoi4(float64 num)
int32 result;
if (!PointerIsValid(num))
elog(ERROR, "dtoi4: unable to convert null", NULL);
elog(ERROR, "dtoi4: unable to convert null");
if ((*num < INT_MIN) || (*num > INT_MAX))
elog(ERROR, "dtoi4: integer out of range", NULL);
elog(ERROR, "dtoi4: integer out of range");
result = rint(*num);
return result;
@ -849,10 +849,10 @@ dtoi2(float64 num)
int16 result;
if (!PointerIsValid(num))
elog(ERROR, "dtoi2: unable to convert null", NULL);
elog(ERROR, "dtoi2: unable to convert null");
if ((*num < SHRT_MIN) || (*num > SHRT_MAX))
elog(ERROR, "dtoi2: integer out of range", NULL);
elog(ERROR, "dtoi2: integer out of range");
result = rint(*num);
return result;
@ -898,10 +898,10 @@ ftoi4(float32 num)
int32 result;
if (!PointerIsValid(num))
elog(ERROR, "ftoi4: unable to convert null", NULL);
elog(ERROR, "ftoi4: unable to convert null");
if ((*num < INT_MIN) || (*num > INT_MAX))
elog(ERROR, "ftoi4: integer out of range", NULL);
elog(ERROR, "ftoi4: integer out of range");
result = rint(*num);
return result;
@ -917,10 +917,10 @@ ftoi2(float32 num)
int16 result;
if (!PointerIsValid(num))
elog(ERROR, "ftoi2: unable to convert null", NULL);
elog(ERROR, "ftoi2: unable to convert null");
if ((*num < SHRT_MIN) || (*num > SHRT_MAX))
elog(ERROR, "ftoi2: integer out of range", NULL);
elog(ERROR, "ftoi2: integer out of range");
result = rint(*num);
return result;