From 1b3bb23cc884eb0b25c5f708a0481dd49ff55ed7 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 26 May 2005 16:44:05 +0000 Subject: [PATCH] Use Abs() macro to replace ? :. --- src/interfaces/ecpg/pgtypeslib/interval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c index 2e644f14c1..f5b2b2573f 100644 --- a/src/interfaces/ecpg/pgtypeslib/interval.c +++ b/src/interfaces/ecpg/pgtypeslib/interval.c @@ -508,7 +508,7 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str) #ifdef HAVE_INT64_TIMESTAMP sprintf(cp, ":%02d", abs(tm->tm_sec)); cp += strlen(cp); - sprintf(cp, ".%06d", (fsec >= 0) ? fsec : -(fsec)); + sprintf(cp, ".%06d", Abs(fsec)); #else fsec += tm->tm_sec; sprintf(cp, ":%013.10f", fabs(fsec)); -- 2.40.0