From 77d1de3c89f7961e072356f889fc48b6c741f21f Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 7 Oct 2005 20:26:41 +0000 Subject: [PATCH] Minor parentheses cleanup. --- src/interfaces/ecpg/pgtypeslib/interval.c | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c index 6c3af18ece..a9ed260e70 100644 --- a/src/interfaces/ecpg/pgtypeslib/interval.c +++ b/src/interfaces/ecpg/pgtypeslib/interval.c @@ -260,7 +260,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm *tm, fsec #ifdef HAVE_INT64_TIMESTAMP *fsec += ((fval - sec) * 1000000); #else - *fsec += (fval - sec); + *fsec += fval - sec; #endif } tmask = DTK_M(MINUTE); @@ -278,7 +278,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm *tm, fsec #ifdef HAVE_INT64_TIMESTAMP *fsec += (fval - sec) * 1000000; #else - *fsec += (fval - sec); + *fsec += fval - sec; #endif } tmask = DTK_M(HOUR); @@ -296,7 +296,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm *tm, fsec #ifdef HAVE_INT64_TIMESTAMP *fsec += (fval - sec) * 1000000; #else - *fsec += (fval - sec); + *fsec += fval - sec; #endif } tmask = (fmask & DTK_M(DAY)) ? 0 : DTK_M(DAY); @@ -314,7 +314,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm *tm, fsec #ifdef HAVE_INT64_TIMESTAMP *fsec += (fval - sec) * 1000000; #else - *fsec += (fval - sec); + *fsec += fval - sec; #endif } tmask = (fmask & DTK_M(DAY)) ? 0 : DTK_M(DAY); @@ -332,7 +332,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm *tm, fsec #ifdef HAVE_INT64_TIMESTAMP *fsec += (fval - sec) * 1000000; #else - *fsec += (fval - sec); + *fsec += fval - sec; #endif } tmask = DTK_M(MONTH); @@ -413,8 +413,8 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm *tm, fsec int sec; #ifdef HAVE_INT64_TIMESTAMP - sec = (*fsec / USECS_PER_SEC); - *fsec -= (sec * USECS_PER_SEC); + sec = *fsec / USECS_PER_SEC; + *fsec -= sec * USECS_PER_SEC; #else TMODULO(*fsec, sec, 1.0); #endif @@ -693,14 +693,14 @@ interval2tm(interval span, struct tm *tm, fsec_t *fsec) time = span.time; #ifdef HAVE_INT64_TIMESTAMP - tm->tm_mday = (time / USECS_PER_DAY); - time -= (tm->tm_mday * USECS_PER_DAY); - tm->tm_hour = (time / USECS_PER_HOUR); - time -= (tm->tm_hour * USECS_PER_HOUR); - tm->tm_min = (time / USECS_PER_MINUTE); - time -= (tm->tm_min * USECS_PER_MINUTE); - tm->tm_sec = (time / USECS_PER_SEC); - *fsec = (time - (tm->tm_sec * USECS_PER_SEC)); + tm->tm_mday = time / USECS_PER_DAY; + time -= tm->tm_mday * USECS_PER_DAY; + tm->tm_hour = time / USECS_PER_HOUR; + time -= tm->tm_hour * USECS_PER_HOUR; + tm->tm_min = time / USECS_PER_MINUTE; + time -= tm->tm_min * USECS_PER_MINUTE; + tm->tm_sec = time / USECS_PER_SEC; + *fsec = time - (tm->tm_sec * USECS_PER_SEC); #else TMODULO(time, tm->tm_mday, (double)SECS_PER_DAY); TMODULO(time, tm->tm_hour, (double)SECS_PER_HOUR);