diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-09-01 03:29:17 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-09-01 03:29:17 +0000 |
commit | af74855a608da4cd7ef88ceb2241ec1c75537f39 (patch) | |
tree | 912ecaa0cdd84297ad886df5ed7c046c7c501411 /src/backend/utils/adt/nabstime.c | |
parent | 2aa080fc933cac47205bc79f026fc89dab0e5149 (diff) | |
download | postgresql-af74855a608da4cd7ef88ceb2241ec1c75537f39.tar.gz postgresql-af74855a608da4cd7ef88ceb2241ec1c75537f39.zip |
Renaming cleanup, no pgindent yet.
Diffstat (limited to 'src/backend/utils/adt/nabstime.c')
-rw-r--r-- | src/backend/utils/adt/nabstime.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index 56cd519f55d..e5dd3c0316c 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.44 1998/07/19 10:08:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.45 1998/09/01 03:26:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -96,7 +96,7 @@ GetCurrentAbsoluteTime(void) CTZName, CTimeZone); #endif - return ((AbsoluteTime) now); + return (AbsoluteTime) now; } /* GetCurrentAbsoluteTime() */ @@ -202,13 +202,13 @@ tm2abstime(struct tm * tm, int tz) || tm->tm_hour < 0 || tm->tm_hour >= 24 || tm->tm_min < 0 || tm->tm_min > 59 || tm->tm_sec < 0 || tm->tm_sec > 59) - return (INVALID_ABSTIME); + return INVALID_ABSTIME; day = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(1970, 1, 1)); /* check for time out of range */ if ((day < MIN_DAYNUM) || (day > MAX_DAYNUM)) - return (INVALID_ABSTIME); + return INVALID_ABSTIME; /* convert to seconds */ sec = tm->tm_sec + tz + (tm->tm_min + (day * 24 + tm->tm_hour) * 60) * 60; @@ -216,13 +216,13 @@ tm2abstime(struct tm * tm, int tz) /* check for overflow */ if ((day == MAX_DAYNUM && sec < 0) || (day == MIN_DAYNUM && sec > 0)) - return (INVALID_ABSTIME); + return INVALID_ABSTIME; /* check for reserved values (e.g. "current" on edge of usual range */ if (!AbsoluteTimeIsReal(sec)) - return (INVALID_ABSTIME); + return INVALID_ABSTIME; - return (sec); + return sec; } /* tm2abstime() */ @@ -338,7 +338,7 @@ nabstimeout(AbsoluteTime time) result = palloc(strlen(buf) + 1); strcpy(result, buf); - return (result); + return result; } /* nabstimeout() */ @@ -358,7 +358,7 @@ AbsoluteTimeIsBefore(AbsoluteTime time1, AbsoluteTime time2) if (time2 == CURRENT_ABSTIME) time2 = GetCurrentTransactionStartTime(); - return (time1 < time2); + return time1 < time2; } bool @@ -373,7 +373,7 @@ AbsoluteTimeIsAfter(AbsoluteTime time1, AbsoluteTime time2) if (time2 == CURRENT_ABSTIME) time2 = GetCurrentTransactionStartTime(); - return (time1 > time2); + return time1 > time2; } @@ -399,78 +399,78 @@ bool abstimeeq(AbsoluteTime t1, AbsoluteTime t2) { if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME) - return (FALSE); + return FALSE; if (t1 == CURRENT_ABSTIME) t1 = GetCurrentTransactionStartTime(); if (t2 == CURRENT_ABSTIME) t2 = GetCurrentTransactionStartTime(); - return (t1 == t2); + return t1 == t2; } bool abstimene(AbsoluteTime t1, AbsoluteTime t2) { if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME) - return (FALSE); + return FALSE; if (t1 == CURRENT_ABSTIME) t1 = GetCurrentTransactionStartTime(); if (t2 == CURRENT_ABSTIME) t2 = GetCurrentTransactionStartTime(); - return (t1 != t2); + return t1 != t2; } bool abstimelt(AbsoluteTime t1, AbsoluteTime t2) { if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME) - return (FALSE); + return FALSE; if (t1 == CURRENT_ABSTIME) t1 = GetCurrentTransactionStartTime(); if (t2 == CURRENT_ABSTIME) t2 = GetCurrentTransactionStartTime(); - return (t1 < t2); + return t1 < t2; } bool abstimegt(AbsoluteTime t1, AbsoluteTime t2) { if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME) - return (FALSE); + return FALSE; if (t1 == CURRENT_ABSTIME) t1 = GetCurrentTransactionStartTime(); if (t2 == CURRENT_ABSTIME) t2 = GetCurrentTransactionStartTime(); - return (t1 > t2); + return t1 > t2; } bool abstimele(AbsoluteTime t1, AbsoluteTime t2) { if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME) - return (FALSE); + return FALSE; if (t1 == CURRENT_ABSTIME) t1 = GetCurrentTransactionStartTime(); if (t2 == CURRENT_ABSTIME) t2 = GetCurrentTransactionStartTime(); - return (t1 <= t2); + return t1 <= t2; } bool abstimege(AbsoluteTime t1, AbsoluteTime t2) { if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME) - return (FALSE); + return FALSE; if (t1 == CURRENT_ABSTIME) t1 = GetCurrentTransactionStartTime(); if (t2 == CURRENT_ABSTIME) t2 = GetCurrentTransactionStartTime(); - return (t1 >= t2); + return t1 >= t2; } @@ -525,7 +525,7 @@ datetime_abstime(DateTime *datetime) }; }; - return (result); + return result; } /* datetime_abstime() */ /* abstime_datetime() @@ -566,5 +566,5 @@ abstime_datetime(AbsoluteTime abstime) break; }; - return (result); + return result; } /* abstime_datetime() */ |