projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e86bc2
)
Fix intoasc() in Informix compat lib. This function used to be a noop.
author
Michael Meskes
Fri, 12 Jun 2015 12:50:47 +0000
(14:50 +0200)
committer
Michael Meskes
Sat, 13 Jun 2015 09:08:16 +0000
(11:08 +0200)
Patch by Michael Paquier
src/interfaces/ecpg/compatlib/informix.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/compatlib/informix.c
b/src/interfaces/ecpg/compatlib/informix.c
index d6de3eac997870da1dd332f9d948ba42aca92115..8d81c83deddd120256ac3539bff1c3440aadb96d 100644
(file)
--- a/
src/interfaces/ecpg/compatlib/informix.c
+++ b/
src/interfaces/ecpg/compatlib/informix.c
@@
-666,12
+666,16
@@
dttofmtasc(timestamp * ts, char *output, int str_len, char *fmtstr)
int
intoasc(interval * i, char *str)
{
+ char *tmp;
+
errno = 0;
-
str
= PGTYPESinterval_to_asc(i);
+
tmp
= PGTYPESinterval_to_asc(i);
- if (!
str
)
+ if (!
tmp
)
return -errno;
+ memcpy(str, tmp, strlen(tmp));
+ free(tmp);
return 0;
}