From 5cecb734a76e01b5d75cfcbfb95e2a244b2e96a8 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 13 Jan 2004 01:32:52 +0000 Subject: [PATCH] Fix ecpg test program to properly access int* null indicator. --- src/interfaces/ecpg/test/test3.pgc | 4 ++-- src/interfaces/ecpg/test/test4.pgc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/interfaces/ecpg/test/test3.pgc b/src/interfaces/ecpg/test/test3.pgc index 2cdde34200..46e9d4904a 100644 --- a/src/interfaces/ecpg/test/test3.pgc +++ b/src/interfaces/ecpg/test/test3.pgc @@ -68,7 +68,7 @@ exec sql end declare section; printf(", born %ld", personal.birth.born); if (ind_personal.ind_birth.age >= 0) printf(", age = %d", personal.birth.age); - if (ind_married >= 0) + if (*ind_married >= 0) printf(", married %10.10s", married->arr); if (ind_children >= 0) printf(", children = %d", children); @@ -98,7 +98,7 @@ exec sql end declare section; printf(", born %ld", personal.birth.born); if (ind_personal.ind_birth.age >= 0) printf(", age = %d", personal.birth.age); - if (ind_married >= 0) + if (*ind_married >= 0) printf(", married %10.10s", married->arr); if (ind_children >= 0) printf(", children = %d", children); diff --git a/src/interfaces/ecpg/test/test4.pgc b/src/interfaces/ecpg/test/test4.pgc index 7a4c49df53..10a5fdca1c 100644 --- a/src/interfaces/ecpg/test/test4.pgc +++ b/src/interfaces/ecpg/test/test4.pgc @@ -1,5 +1,6 @@ #include #include +#include exec sql whenever sqlerror sqlprint; -- GitLab