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
|
||||
intoasc(interval * i, char *str)
|
||||
{
|
||||
errno = 0;
|
||||
str = PGTYPESinterval_to_asc(i);
|
||||
char *tmp;
|
||||
|
||||
if (!str)
|
||||
errno = 0;
|
||||
tmp = PGTYPESinterval_to_asc(i);
|
||||
|
||||
if (!tmp)
|
||||
return -errno;
|
||||
|
||||
memcpy(str, tmp, strlen(tmp));
|
||||
free(tmp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user