aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/int8.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/int8.c')
-rw-r--r--src/backend/utils/adt/int8.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index a7df878c65b..3f286069b7d 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.28 2001/01/26 22:50:26 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.29 2001/03/22 03:59:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -67,15 +67,15 @@ int8in(PG_FUNCTION_ARGS)
* Do our own scan, rather than relying on sscanf which might be
* broken for long long.
*/
- while (*ptr && isspace((unsigned char) *ptr)) /* skip leading spaces */
+ while (*ptr && isspace((unsigned char) *ptr)) /* skip leading spaces */
ptr++;
if (*ptr == '-') /* handle sign */
sign = -1, ptr++;
else if (*ptr == '+')
ptr++;
- if (!isdigit((unsigned char) *ptr)) /* require at least one digit */
+ if (!isdigit((unsigned char) *ptr)) /* require at least one digit */
elog(ERROR, "Bad int8 external representation \"%s\"", str);
- while (*ptr && isdigit((unsigned char) *ptr)) /* process digits */
+ while (*ptr && isdigit((unsigned char) *ptr)) /* process digits */
{
int64 newtmp = tmp * 10 + (*ptr++ - '0');
@@ -409,7 +409,7 @@ int8um(PG_FUNCTION_ARGS)
{
int64 val = PG_GETARG_INT64(0);
- PG_RETURN_INT64(- val);
+ PG_RETURN_INT64(-val);
}
Datum
@@ -702,10 +702,11 @@ dtoi8(PG_FUNCTION_ARGS)
/* Round val to nearest integer (but it's still in float form) */
val = rint(val);
+
/*
- * Does it fit in an int64? Avoid assuming that we have handy constants
- * defined for the range boundaries, instead test for overflow by
- * reverse-conversion.
+ * Does it fit in an int64? Avoid assuming that we have handy
+ * constants defined for the range boundaries, instead test for
+ * overflow by reverse-conversion.
*/
result = (int64) val;