aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/test/compat_informix/dec_test.pgc')
-rw-r--r--src/interfaces/ecpg/test/compat_informix/dec_test.pgc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/test/compat_informix/dec_test.pgc b/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
index 8f6f109dcfc..8e333206b5b 100644
--- a/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
+++ b/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
@@ -38,7 +38,7 @@ main(void)
long l;
int i, j, k, q, r, count = 0;
double dbl;
- decimal **decarr = (decimal **) malloc(1);
+ decimal **decarr = (decimal **) calloc(1, sizeof(decimal));
ECPGdebug(1, stderr);
@@ -71,7 +71,7 @@ main(void)
din = PGTYPESdecimal_new();
r = dectoasc(din, buf, BUFSIZE-1, 2);
- if (!r < 0) check_errno();
+ if (r < 0) check_errno();
printf("dec[%d,5]: r: %d, %s\n", i, r, buf);
r = dectolong(dec, &l);