Skip to content
Snippets Groups Projects
Commit 96be4b28 authored by Michael Meskes's avatar Michael Meskes
Browse files

Applied patch to fix two compatibility functions.

parent ffcb1491
No related branches found
No related tags found
No related merge requests found
...@@ -415,8 +415,8 @@ rdatestr (Date d, char *str) ...@@ -415,8 +415,8 @@ rdatestr (Date d, char *str)
return -1210; return -1210;
/* move to user allocated buffer */ /* move to user allocated buffer */
strcpy(tmp, str); strcpy(str, tmp);
free(str); free(tmp);
return 0; return 0;
} }
...@@ -532,6 +532,10 @@ dtsub (Timestamp *ts1, Timestamp *ts2, Interval *iv) ...@@ -532,6 +532,10 @@ dtsub (Timestamp *ts1, Timestamp *ts2, Interval *iv)
int int
dttoasc (Timestamp *ts, char *output) dttoasc (Timestamp *ts, char *output)
{ {
char *asctime = PGTYPEStimestamp_to_asc( *ts );
strcpy (output, asctime);
free(asctime);
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment