Fix intoasc() in Informix compat lib. This function used to be a noop.
Patch by Michael Paquier
This commit is contained in:
parent
091c02a958
commit
82be1bf509
@ -666,12 +666,16 @@ dttofmtasc(timestamp * ts, char *output, int str_len, char *fmtstr)
|
|||||||
int
|
int
|
||||||
intoasc(interval * i, char *str)
|
intoasc(interval * i, char *str)
|
||||||
{
|
{
|
||||||
errno = 0;
|
char *tmp;
|
||||||
str = PGTYPESinterval_to_asc(i);
|
|
||||||
|
|
||||||
if (!str)
|
errno = 0;
|
||||||
|
tmp = PGTYPESinterval_to_asc(i);
|
||||||
|
|
||||||
|
if (!tmp)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
|
memcpy(str, tmp, strlen(tmp));
|
||||||
|
free(tmp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user