diff options
Diffstat (limited to 'src/interfaces/ecpg/test/preproc')
-rw-r--r-- | src/interfaces/ecpg/test/preproc/autoprep.pgc | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/test/preproc/outofscope.pgc | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/test/preproc/variable.pgc | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/ecpg/test/preproc/autoprep.pgc b/src/interfaces/ecpg/test/preproc/autoprep.pgc index 31c3ab7a56e..d3d9305da5b 100644 --- a/src/interfaces/ecpg/test/preproc/autoprep.pgc +++ b/src/interfaces/ecpg/test/preproc/autoprep.pgc @@ -50,7 +50,7 @@ static void test(void) { EXEC SQL WHENEVER NOT FOUND DO BREAK; i = 0; - while (1) + while (i < 100) { EXEC SQL FETCH cur1 INTO :item1:ind1; printf("item[%d] = %d\n", i, ind1 ? -1 : item1); diff --git a/src/interfaces/ecpg/test/preproc/outofscope.pgc b/src/interfaces/ecpg/test/preproc/outofscope.pgc index 63221147296..642835400b2 100644 --- a/src/interfaces/ecpg/test/preproc/outofscope.pgc +++ b/src/interfaces/ecpg/test/preproc/outofscope.pgc @@ -66,7 +66,7 @@ main (void) { MYTYPE *myvar; MYNULLTYPE *mynullvar; - + int loopcount; char msg[128]; ECPGdebug(1, stderr); @@ -95,7 +95,7 @@ main (void) exec sql whenever not found do break; - while (1) + for (loopcount = 0; loopcount < 100; loopcount++) { memset(myvar, 0, sizeof(MYTYPE)); get_record1(); diff --git a/src/interfaces/ecpg/test/preproc/variable.pgc b/src/interfaces/ecpg/test/preproc/variable.pgc index 05420afdb2c..c75d8f49dba 100644 --- a/src/interfaces/ecpg/test/preproc/variable.pgc +++ b/src/interfaces/ecpg/test/preproc/variable.pgc @@ -35,7 +35,7 @@ exec sql end declare section; exec sql char *married = NULL; exec sql long ind_married; exec sql ind children; - + int loopcount; char msg[128]; ECPGdebug(1, stderr); @@ -67,7 +67,7 @@ exec sql end declare section; p=&personal; i=&ind_personal; memset(i, 0, sizeof(ind_personal)); - while (1) { + for (loopcount = 0; loopcount < 100; loopcount++) { strcpy(msg, "fetch"); exec sql fetch cur into :p:i, :married:ind_married, :children.integer:ind_children.smallint; printf("%8.8s", personal.name.arr); |