Skip to content

Commit 70767ac

Browse files
author
Michael Meskes
committed
Fix intoasc() in Informix compat lib. This function used to be a noop.
Patch by Michael Paquier
1 parent 4f60d66 commit 70767ac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/interfaces/ecpg/compatlib/informix.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,12 +666,16 @@ dttofmtasc(timestamp * ts, char *output, int str_len, char *fmtstr)
666666
int
667667
intoasc(interval * i, char *str)
668668
{
669+
char *tmp;
670+
669671
errno = 0;
670-
str = PGTYPESinterval_to_asc(i);
672+
tmp = PGTYPESinterval_to_asc(i);
671673

672-
if (!str)
674+
if (!tmp)
673675
return -errno;
674676

677+
memcpy(str, tmp, strlen(tmp));
678+
free(tmp);
675679
return 0;
676680
}
677681

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy