Skip to content

Commit 5cecb73

Browse files
committed
Fix ecpg test program to properly access int* null indicator.
1 parent 67af5ba commit 5cecb73

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/interfaces/ecpg/test/test3.pgc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ exec sql end declare section;
6868
printf(", born %ld", personal.birth.born);
6969
if (ind_personal.ind_birth.age >= 0)
7070
printf(", age = %d", personal.birth.age);
71-
if (ind_married >= 0)
71+
if (*ind_married >= 0)
7272
printf(", married %10.10s", married->arr);
7373
if (ind_children >= 0)
7474
printf(", children = %d", children);
@@ -98,7 +98,7 @@ exec sql end declare section;
9898
printf(", born %ld", personal.birth.born);
9999
if (ind_personal.ind_birth.age >= 0)
100100
printf(", age = %d", personal.birth.age);
101-
if (ind_married >= 0)
101+
if (*ind_married >= 0)
102102
printf(", married %10.10s", married->arr);
103103
if (ind_children >= 0)
104104
printf(", children = %d", children);

src/interfaces/ecpg/test/test4.pgc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <locale.h>
22
#include <string.h>
3+
#include <stdlib.h>
34

45
exec sql whenever sqlerror sqlprint;
56

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