]> granicus.if.org Git - postgresql/commitdiff
More minor spacing improvements.
authorBruce Momjian <bruce@momjian.us>
Fri, 22 Jul 2005 05:03:09 +0000 (05:03 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 22 Jul 2005 05:03:09 +0000 (05:03 +0000)
src/backend/utils/adt/date.c

index 1c40db57c14228acf85d2347a6a97f02ad8e92f3..fdb3942f4ffaed8526c0352697b303232e1161f8 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.117 2005/07/22 03:46:33 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.118 2005/07/22 05:03:09 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1093,18 +1093,13 @@ AdjustTimeForTypmod(TimeADT *time, int32 typmod)
                 */
 #ifdef HAVE_INT64_TIMESTAMP
                if (*time >= INT64CONST(0))
-               {
                        *time = ((*time + TimeOffsets[typmod]) / TimeScales[typmod]) *
                                        TimeScales[typmod];
-               }
                else
-               {
                        *time = -((((-*time) + TimeOffsets[typmod]) / TimeScales[typmod]) *
                                        TimeScales[typmod]);
-               }
 #else
-               *time = rint((double)*time * TimeScales[typmod])
-                                / TimeScales[typmod];
+               *time = rint((double) * time * TimeScales[typmod]) / TimeScales[typmod];
 #endif
        }
 }
@@ -2496,9 +2491,9 @@ timetz_zone(PG_FUNCTION_ARGS)
        pg_time_t   now;
 
        /* Find the specified timezone */ 
-       len = (VARSIZE(zone)-VARHDRSZ>TZ_STRLEN_MAX) ?
+       len = (VARSIZE(zone) - VARHDRSZ > TZ_STRLEN_MAX) ?
                                        TZ_STRLEN_MAX : VARSIZE(zone) - VARHDRSZ;
-       memcpy(tzname,VARDATA(zone),len);
+       memcpy(tzname, VARDATA(zone), len);
        tzname[len]=0;
        tzp = pg_tzset(tzname);
        if (!tzp) {
@@ -2537,7 +2532,7 @@ timetz_zone(PG_FUNCTION_ARGS)
        result->zone = tz;
 
        PG_RETURN_TIMETZADT_P(result);
-}      /* timetz_zone() */
+}
 
 /* timetz_izone()
  * Encode time with time zone type with specified time interval as time zone.
@@ -2582,4 +2577,4 @@ timetz_izone(PG_FUNCTION_ARGS)
        result->zone = tz;
 
        PG_RETURN_TIMETZADT_P(result);
-}      /* timetz_izone() */
+}