diff options
Diffstat (limited to 'src/interfaces/ecpg/test/expected/compat_informix-dec_test.c')
-rw-r--r-- | src/interfaces/ecpg/test/expected/compat_informix-dec_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c index fd5d5c7868d..f9f0bf3ab11 100644 --- a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c +++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c @@ -58,7 +58,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); @@ -91,7 +91,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); |