projects
/
users
/
gsingh
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f35d493
)
Use Abs() macro to replace ? :.
author
Bruce Momjian
<bruce@momjian.us>
Thu, 26 May 2005 16:44:05 +0000
(16:44 +0000)
committer
Bruce Momjian
<bruce@momjian.us>
Thu, 26 May 2005 16:44:05 +0000
(16:44 +0000)
src/interfaces/ecpg/pgtypeslib/interval.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/pgtypeslib/interval.c
b/src/interfaces/ecpg/pgtypeslib/interval.c
index 2e644f14c19060951ff2eb6134d810a8214028b6..f5b2b2573f2e237765eb1cfb4c2f05e68669dfc2 100644
(file)
--- 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));