summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2017-08-17 16:39:20 +0000
committerPeter Eisentraut2017-09-05 18:52:55 +0000
commit17273d059cd3a5cba818505b0d47a444c36a3513 (patch)
tree812c47b95d279e50e5d797852edd6664f217a0c8
parentba26f5cf768a31e0cbdf5eb8675ee187ad35fd0b (diff)
Remove unnecessary parentheses in return statements
The parenthesized style has only been used in a few modules. Change that to use the style that is predominant across the whole tree. Reviewed-by: Michael Paquier <[email protected]> Reviewed-by: Ryan Murphy <[email protected]>
-rw-r--r--contrib/btree_gist/btree_utils_num.c2
-rw-r--r--contrib/btree_gist/btree_utils_var.c4
-rw-r--r--contrib/cube/cube.c34
-rw-r--r--contrib/dblink/dblink.c10
-rw-r--r--contrib/intarray/_int_bool.c4
-rw-r--r--contrib/ltree/ltxtquery_op.c2
-rw-r--r--contrib/pgcrypto/crypt-des.c30
-rw-r--r--contrib/pgstattuple/pgstatindex.c2
-rw-r--r--contrib/seg/seg.c8
-rw-r--r--contrib/spi/refint.c2
-rw-r--r--contrib/spi/timetravel.c4
-rw-r--r--doc/src/sgml/spi.sgml2
-rw-r--r--src/backend/bootstrap/bootscanner.l56
-rw-r--r--src/backend/tsearch/spell.c10
-rw-r--r--src/backend/utils/adt/inet_cidr_ntop.c18
-rw-r--r--src/backend/utils/adt/inet_net_pton.c44
-rw-r--r--src/backend/utils/adt/tsgistidx.c4
-rw-r--r--src/backend/utils/mb/Unicode/convutils.pm2
-rw-r--r--src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c4
-rw-r--r--src/interfaces/ecpg/compatlib/informix.c16
-rw-r--r--src/interfaces/ecpg/ecpglib/connect.c12
-rw-r--r--src/interfaces/ecpg/ecpglib/data.c48
-rw-r--r--src/interfaces/ecpg/ecpglib/descriptor.c44
-rw-r--r--src/interfaces/ecpg/ecpglib/error.c16
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c102
-rw-r--r--src/interfaces/ecpg/ecpglib/memory.c6
-rw-r--r--src/interfaces/ecpg/ecpglib/misc.c24
-rw-r--r--src/interfaces/ecpg/ecpglib/prepare.c22
-rw-r--r--src/interfaces/ecpg/pgtypeslib/common.c4
-rw-r--r--src/interfaces/ecpg/pgtypeslib/numeric.c14
-rw-r--r--src/interfaces/ecpg/pgtypeslib/timestamp.c10
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c4
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header10
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l86
-rw-r--r--src/interfaces/ecpg/preproc/type.c84
-rw-r--r--src/interfaces/ecpg/preproc/variable.c36
-rw-r--r--src/interfaces/ecpg/test/compat_informix/dec_test.pgc2
-rw-r--r--src/interfaces/ecpg/test/compat_informix/describe.pgc2
-rw-r--r--src/interfaces/ecpg/test/compat_informix/rfmtdate.pgc2
-rw-r--r--src/interfaces/ecpg/test/compat_informix/rfmtlong.pgc2
-rw-r--r--src/interfaces/ecpg/test/compat_informix/sqlda.pgc2
-rw-r--r--src/interfaces/ecpg/test/connect/test1.pgc2
-rw-r--r--src/interfaces/ecpg/test/connect/test2.pgc2
-rw-r--r--src/interfaces/ecpg/test/connect/test3.pgc2
-rw-r--r--src/interfaces/ecpg/test/connect/test4.pgc2
-rw-r--r--src/interfaces/ecpg/test/connect/test5.pgc2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-dec_test.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-describe.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c2
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-sqlda.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test1.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test2.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test3.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test4.c2
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test5.c2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c2
-rw-r--r--src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-array_of_struct.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-cursor.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-define.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-describe.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-outofscope.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-strings.c2
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-variable.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-array.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-describe.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-execute.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-oldexec.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-sqlda.c2
-rw-r--r--src/interfaces/ecpg/test/expected/sql-twophase.c2
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread.c8
-rw-r--r--src/interfaces/ecpg/test/expected/thread-thread_implicit.c8
-rw-r--r--src/interfaces/ecpg/test/performance/perftest.pgc2
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc2
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc2
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc2
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/num_test.pgc2
-rw-r--r--src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc2
-rw-r--r--src/interfaces/ecpg/test/preproc/array_of_struct.pgc2
-rw-r--r--src/interfaces/ecpg/test/preproc/cursor.pgc2
-rw-r--r--src/interfaces/ecpg/test/preproc/define.pgc2
-rw-r--r--src/interfaces/ecpg/test/preproc/outofscope.pgc2
-rw-r--r--src/interfaces/ecpg/test/preproc/pointer_to_struct.pgc2
-rw-r--r--src/interfaces/ecpg/test/preproc/strings.pgc2
-rw-r--r--src/interfaces/ecpg/test/preproc/variable.pgc2
-rw-r--r--src/interfaces/ecpg/test/sql/array.pgc2
-rw-r--r--src/interfaces/ecpg/test/sql/describe.pgc2
-rw-r--r--src/interfaces/ecpg/test/sql/execute.pgc2
-rw-r--r--src/interfaces/ecpg/test/sql/oldexec.pgc2
-rw-r--r--src/interfaces/ecpg/test/sql/sqlda.pgc2
-rw-r--r--src/interfaces/ecpg/test/sql/twophase.pgc2
-rw-r--r--src/interfaces/ecpg/test/thread/thread.pgc8
-rw-r--r--src/interfaces/ecpg/test/thread/thread_implicit.pgc8
-rw-r--r--src/test/isolation/specscanner.l10
99 files changed, 469 insertions, 469 deletions
diff --git a/contrib/btree_gist/btree_utils_num.c b/contrib/btree_gist/btree_utils_num.c
index bae32c4064d..b2295f2c7d7 100644
--- a/contrib/btree_gist/btree_utils_num.c
+++ b/contrib/btree_gist/btree_utils_num.c
@@ -296,7 +296,7 @@ gbt_num_consistent(const GBT_NUMKEY_R *key,
retval = false;
}
- return (retval);
+ return retval;
}
diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c
index 2c636ad2fa8..ecc87f3bb33 100644
--- a/contrib/btree_gist/btree_utils_var.c
+++ b/contrib/btree_gist/btree_utils_var.c
@@ -159,7 +159,7 @@ gbt_var_node_cp_len(const GBT_VARKEY *node, const gbtree_vinfo *tinfo)
l--;
i++;
}
- return (ml); /* lower == upper */
+ return ml; /* lower == upper */
}
@@ -299,7 +299,7 @@ gbt_var_compress(GISTENTRY *entry, const gbtree_vinfo *tinfo)
else
retval = entry;
- return (retval);
+ return retval;
}
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index 149558c7634..0e968d1c764 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -625,7 +625,7 @@ g_cube_leaf_consistent(NDBOX *key,
default:
retval = FALSE;
}
- return (retval);
+ return retval;
}
bool
@@ -652,7 +652,7 @@ g_cube_internal_consistent(NDBOX *key,
default:
retval = FALSE;
}
- return (retval);
+ return retval;
}
NDBOX *
@@ -663,7 +663,7 @@ g_cube_binary_union(NDBOX *r1, NDBOX *r2, int *sizep)
retval = cube_union_v0(r1, r2);
*sizep = VARSIZE(retval);
- return (retval);
+ return retval;
}
@@ -729,7 +729,7 @@ cube_union_v0(NDBOX *a, NDBOX *b)
SET_POINT_BIT(result);
}
- return (result);
+ return result;
}
Datum
@@ -1058,7 +1058,7 @@ cube_contains_v0(NDBOX *a, NDBOX *b)
int i;
if ((a == NULL) || (b == NULL))
- return (FALSE);
+ return FALSE;
if (DIM(a) < DIM(b))
{
@@ -1070,9 +1070,9 @@ cube_contains_v0(NDBOX *a, NDBOX *b)
for (i = DIM(a); i < DIM(b); i++)
{
if (LL_COORD(b, i) != 0)
- return (FALSE);
+ return FALSE;
if (UR_COORD(b, i) != 0)
- return (FALSE);
+ return FALSE;
}
}
@@ -1081,13 +1081,13 @@ cube_contains_v0(NDBOX *a, NDBOX *b)
{
if (Min(LL_COORD(a, i), UR_COORD(a, i)) >
Min(LL_COORD(b, i), UR_COORD(b, i)))
- return (FALSE);
+ return FALSE;
if (Max(LL_COORD(a, i), UR_COORD(a, i)) <
Max(LL_COORD(b, i), UR_COORD(b, i)))
- return (FALSE);
+ return FALSE;
}
- return (TRUE);
+ return TRUE;
}
Datum
@@ -1128,7 +1128,7 @@ cube_overlap_v0(NDBOX *a, NDBOX *b)
int i;
if ((a == NULL) || (b == NULL))
- return (FALSE);
+ return FALSE;
/* swap the box pointers if needed */
if (DIM(a) < DIM(b))
@@ -1143,21 +1143,21 @@ cube_overlap_v0(NDBOX *a, NDBOX *b)
for (i = 0; i < DIM(b); i++)
{
if (Min(LL_COORD(a, i), UR_COORD(a, i)) > Max(LL_COORD(b, i), UR_COORD(b, i)))
- return (FALSE);
+ return FALSE;
if (Max(LL_COORD(a, i), UR_COORD(a, i)) < Min(LL_COORD(b, i), UR_COORD(b, i)))
- return (FALSE);
+ return FALSE;
}
/* compare to zero those dimensions in (a) absent in (b) */
for (i = DIM(b); i < DIM(a); i++)
{
if (Min(LL_COORD(a, i), UR_COORD(a, i)) > 0)
- return (FALSE);
+ return FALSE;
if (Max(LL_COORD(a, i), UR_COORD(a, i)) < 0)
- return (FALSE);
+ return FALSE;
}
- return (TRUE);
+ return TRUE;
}
@@ -1385,7 +1385,7 @@ distance_1D(double a1, double a2, double b1, double b2)
return (Min(a1, a2) - Max(b1, b2));
/* the rest are all sorts of intersections */
- return (0.0);
+ return 0.0;
}
/* Test if a box is also a point */
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 3113b07ab8e..7dc7716a3a9 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -2217,7 +2217,7 @@ get_sql_insert(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals
}
appendStringInfoChar(&buf, ')');
- return (buf.data);
+ return buf.data;
}
static char *
@@ -2254,7 +2254,7 @@ get_sql_delete(Relation rel, int *pkattnums, int pknumatts, char **tgt_pkattvals
appendStringInfoString(&buf, " IS NULL");
}
- return (buf.data);
+ return buf.data;
}
static char *
@@ -2341,7 +2341,7 @@ get_sql_update(Relation rel, int *pkattnums, int pknumatts, char **src_pkattvals
appendStringInfoString(&buf, " IS NULL");
}
- return (buf.data);
+ return buf.data;
}
/*
@@ -2549,9 +2549,9 @@ getConnectionByName(const char *name)
key, HASH_FIND, NULL);
if (hentry)
- return (hentry->rconn);
+ return hentry->rconn;
- return (NULL);
+ return NULL;
}
static HTAB *
diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c
index a18c6456067..01e47c53d06 100644
--- a/contrib/intarray/_int_bool.c
+++ b/contrib/intarray/_int_bool.c
@@ -245,7 +245,7 @@ checkcondition_arr(void *checkval, ITEM *item)
{
StopMiddle = StopLow + (StopHigh - StopLow) / 2;
if (*StopMiddle == item->val)
- return (true);
+ return true;
else if (*StopMiddle < item->val)
StopLow = StopMiddle + 1;
else
@@ -274,7 +274,7 @@ execute(ITEM *curitem, void *checkval, bool calcnot,
return (*chkcond) (checkval, curitem);
else if (curitem->val == (int32) '!')
{
- return (calcnot) ?
+ return calcnot ?
((execute(curitem - 1, checkval, calcnot, chkcond)) ? false : true)
: true;
}
diff --git a/contrib/ltree/ltxtquery_op.c b/contrib/ltree/ltxtquery_op.c
index 1428c8b4780..6e9dbc46906 100644
--- a/contrib/ltree/ltxtquery_op.c
+++ b/contrib/ltree/ltxtquery_op.c
@@ -26,7 +26,7 @@ ltree_execute(ITEM *curitem, void *checkval, bool calcnot, bool (*chkcond) (void
return (*chkcond) (checkval, curitem);
else if (curitem->val == (int32) '!')
{
- return (calcnot) ?
+ return calcnot ?
((ltree_execute(curitem + 1, checkval, calcnot, chkcond)) ? false : true)
: true;
}
diff --git a/contrib/pgcrypto/crypt-des.c b/contrib/pgcrypto/crypt-des.c
index 60bdbb0c912..ee3a0f21696 100644
--- a/contrib/pgcrypto/crypt-des.c
+++ b/contrib/pgcrypto/crypt-des.c
@@ -206,18 +206,18 @@ static inline int
ascii_to_bin(char ch)
{
if (ch > 'z')
- return (0);
+ return 0;
if (ch >= 'a')
return (ch - 'a' + 38);
if (ch > 'Z')
- return (0);
+ return 0;
if (ch >= 'A')
return (ch - 'A' + 12);
if (ch > '9')
- return (0);
+ return 0;
if (ch >= '.')
return (ch - '.');
- return (0);
+ return 0;
}
static void
@@ -420,7 +420,7 @@ des_setkey(const char *key)
* (which is weak and has bad parity anyway) in order to simplify the
* starting conditions.
*/
- return (0);
+ return 0;
}
old_rawkey0 = rawkey0;
old_rawkey1 = rawkey1;
@@ -479,7 +479,7 @@ des_setkey(const char *key)
| comp_maskr[6][(t1 >> 7) & 0x7f]
| comp_maskr[7][t1 & 0x7f];
}
- return (0);
+ return 0;
}
static int
@@ -500,7 +500,7 @@ do_des(uint32 l_in, uint32 r_in, uint32 *l_out, uint32 *r_out, int count)
int round;
if (count == 0)
- return (1);
+ return 1;
else if (count > 0)
{
/*
@@ -613,7 +613,7 @@ do_des(uint32 l_in, uint32 r_in, uint32 *l_out, uint32 *r_out, int count)
| fp_maskr[5][(r >> 16) & 0xff]
| fp_maskr[6][(r >> 8) & 0xff]
| fp_maskr[7][r & 0xff];
- return (0);
+ return 0;
}
static int
@@ -639,7 +639,7 @@ des_cipher(const char *in, char *out, long salt, int count)
retval = do_des(rawl, rawr, &l_out, &r_out, count);
if (retval)
- return (retval);
+ return retval;
buffer[0] = htonl(l_out);
buffer[1] = htonl(r_out);
@@ -647,7 +647,7 @@ des_cipher(const char *in, char *out, long salt, int count)
/* copy data to avoid assuming output is word-aligned */
memcpy(out, buffer, sizeof(buffer));
- return (retval);
+ return retval;
}
char *
@@ -680,7 +680,7 @@ px_crypt_des(const char *key, const char *setting)
key++;
}
if (des_setkey((char *) keybuf))
- return (NULL);
+ return NULL;
#ifndef DISABLE_XDES
if (*setting == _PASSWORD_EFMT1)
@@ -711,7 +711,7 @@ px_crypt_des(const char *key, const char *setting)
* Encrypt the key with itself.
*/
if (des_cipher((char *) keybuf, (char *) keybuf, 0L, 1))
- return (NULL);
+ return NULL;
/*
* And XOR with the next 8 characters of the key.
@@ -721,7 +721,7 @@ px_crypt_des(const char *key, const char *setting)
*q++ ^= *key++ << 1;
if (des_setkey((char *) keybuf))
- return (NULL);
+ return NULL;
}
StrNCpy(output, setting, 10);
@@ -767,7 +767,7 @@ px_crypt_des(const char *key, const char *setting)
* Do it.
*/
if (do_des(0L, 0L, &r0, &r1, count))
- return (NULL);
+ return NULL;
/*
* Now encode the result...
@@ -790,5 +790,5 @@ px_crypt_des(const char *key, const char *setting)
*p++ = _crypt_a64[l & 0x3f];
*p = 0;
- return (output);
+ return output;
}
diff --git a/contrib/pgstattuple/pgstatindex.c b/contrib/pgstattuple/pgstatindex.c
index 9365ba7e02c..75317b96a2f 100644
--- a/contrib/pgstattuple/pgstatindex.c
+++ b/contrib/pgstattuple/pgstatindex.c
@@ -568,7 +568,7 @@ pgstatginindex_internal(Oid relid, FunctionCallInfo fcinfo)
tuple = heap_form_tuple(tupleDesc, values, nulls);
result = HeapTupleGetDatum(tuple);
- return (result);
+ return result;
}
/* ------------------------------------------------------
diff --git a/contrib/seg/seg.c b/contrib/seg/seg.c
index 4fc18130e19..e707b18fc67 100644
--- a/contrib/seg/seg.c
+++ b/contrib/seg/seg.c
@@ -528,7 +528,7 @@ gseg_binary_union(Datum r1, Datum r2, int *sizep)
retval = DirectFunctionCall2(seg_union, r1, r2);
*sizep = sizeof(SEG);
- return (retval);
+ return retval;
}
@@ -1040,7 +1040,7 @@ restore(char *result, float val, int n)
/* ... this is not done yet. */
}
- return (strlen(result));
+ return strlen(result);
}
@@ -1080,7 +1080,7 @@ significant_digits(char *s)
}
if (!n)
- return (zeroes);
+ return zeroes;
- return (n);
+ return n;
}
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index 46205c76136..70def95ac5e 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -636,5 +636,5 @@ find_plan(char *ident, EPlan **eplan, int *nplans)
newp->splan = NULL;
(*nplans)++;
- return (newp);
+ return newp;
}
diff --git a/contrib/spi/timetravel.c b/contrib/spi/timetravel.c
index 2c66d888dfe..816cc549ae1 100644
--- a/contrib/spi/timetravel.c
+++ b/contrib/spi/timetravel.c
@@ -517,7 +517,7 @@ findTTStatus(char *name)
AbsoluteTime
currabstime()
{
- return (GetCurrentAbsoluteTime());
+ return GetCurrentAbsoluteTime();
}
*/
@@ -549,5 +549,5 @@ find_plan(char *ident, EPlan **eplan, int *nplans)
newp->splan = NULL;
(*nplans)++;
- return (newp);
+ return newp;
}
diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml
index d04b5a2125e..31535a307d1 100644
--- a/doc/src/sgml/spi.sgml
+++ b/doc/src/sgml/spi.sgml
@@ -4397,7 +4397,7 @@ execq(text *sql, int cnt)
SPI_finish();
pfree(command);
- return (proc);
+ return proc;
}
</programlisting>
diff --git a/src/backend/bootstrap/bootscanner.l b/src/backend/bootstrap/bootscanner.l
index 6467882fa37..51c5e5e3cd6 100644
--- a/src/backend/bootstrap/bootscanner.l
+++ b/src/backend/bootstrap/bootscanner.l
@@ -72,25 +72,25 @@ arrayid [A-Za-z0-9_]+\[{D}*\]
%%
-open { return(OPEN); }
+open { return OPEN; }
-close { return(XCLOSE); }
+close { return XCLOSE; }
-create { return(XCREATE); }
+create { return XCREATE; }
-OID { return(OBJ_ID); }
-bootstrap { return(XBOOTSTRAP); }
-"shared_relation" { return(XSHARED_RELATION); }
-"without_oids" { return(XWITHOUT_OIDS); }
-"rowtype_oid" { return(XROWTYPE_OID); }
-_null_ { return(NULLVAL); }
+OID { return OBJ_ID; }
+bootstrap { return XBOOTSTRAP; }
+"shared_relation" { return XSHARED_RELATION; }
+"without_oids" { return XWITHOUT_OIDS; }
+"rowtype_oid" { return XROWTYPE_OID; }
+_null_ { return NULLVAL; }
-insert { return(INSERT_TUPLE); }
+insert { return INSERT_TUPLE; }
-"," { return(COMMA); }
-"=" { return(EQUALS); }
-"(" { return(LPAREN); }
-")" { return(RPAREN); }
+"," { return COMMA; }
+"=" { return EQUALS; }
+"(" { return LPAREN; }
+")" { return RPAREN; }
[\n] { yyline++; }
[\t] ;
@@ -99,31 +99,31 @@ insert { return(INSERT_TUPLE); }
^\#[^\n]* ; /* drop everything after "#" for comments */
-"declare" { return(XDECLARE); }
-"build" { return(XBUILD); }
-"indices" { return(INDICES); }
-"unique" { return(UNIQUE); }
-"index" { return(INDEX); }
-"on" { return(ON); }
-"using" { return(USING); }
-"toast" { return(XTOAST); }
-"FORCE" { return(XFORCE); }
-"NOT" { return(XNOT); }
-"NULL" { return(XNULL); }
+"declare" { return XDECLARE; }
+"build" { return XBUILD; }
+"indices" { return INDICES; }
+"unique" { return UNIQUE; }
+"index" { return INDEX; }
+"on" { return ON; }
+"using" { return USING; }
+"toast" { return XTOAST; }
+"FORCE" { return XFORCE; }
+"NOT" { return XNOT; }
+"NULL" { return XNULL; }
{arrayid} {
yylval.str = MapArrayTypeName(yytext);
- return(ID);
+ return ID;
}
{id} {
yylval.str = scanstr(yytext);
- return(ID);
+ return ID;
}
{sid} {
yytext[strlen(yytext)-1] = '\0'; /* strip off quotes */
yylval.str = scanstr(yytext+1);
yytext[strlen(yytext)] = '"'; /* restore quotes */
- return(ID);
+ return ID;
}
. {
diff --git a/src/backend/tsearch/spell.c b/src/backend/tsearch/spell.c
index 10202504905..6527c737314 100644
--- a/src/backend/tsearch/spell.c
+++ b/src/backend/tsearch/spell.c
@@ -195,14 +195,14 @@ static char *VoidString = "";
static int
cmpspell(const void *s1, const void *s2)
{
- return (strcmp((*(SPELL *const *) s1)->word, (*(SPELL *const *) s2)->word));
+ return strcmp((*(SPELL *const *) s1)->word, (*(SPELL *const *) s2)->word);
}
static int
cmpspellaffix(const void *s1, const void *s2)
{
- return (strcmp((*(SPELL *const *) s1)->p.flag,
- (*(SPELL *const *) s2)->p.flag));
+ return strcmp((*(SPELL *const *) s1)->p.flag,
+ (*(SPELL *const *) s2)->p.flag);
}
static int
@@ -2240,9 +2240,9 @@ NormalizeSubWord(IspellDict *Conf, char *word, int flag)
if (cur == forms)
{
pfree(forms);
- return (NULL);
+ return NULL;
}
- return (forms);
+ return forms;
}
typedef struct SplitVar
diff --git a/src/backend/utils/adt/inet_cidr_ntop.c b/src/backend/utils/adt/inet_cidr_ntop.c
index 2973d566587..30b3673789f 100644
--- a/src/backend/utils/adt/inet_cidr_ntop.c
+++ b/src/backend/utils/adt/inet_cidr_ntop.c
@@ -58,12 +58,12 @@ inet_cidr_ntop(int af, const void *src, int bits, char *dst, size_t size)
switch (af)
{
case PGSQL_AF_INET:
- return (inet_cidr_ntop_ipv4(src, bits, dst, size));
+ return inet_cidr_ntop_ipv4(src, bits, dst, size);
case PGSQL_AF_INET6:
- return (inet_cidr_ntop_ipv6(src, bits, dst, size));
+ return inet_cidr_ntop_ipv6(src, bits, dst, size);
default:
errno = EAFNOSUPPORT;
- return (NULL);
+ return NULL;
}
}
@@ -92,7 +92,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
if (bits < 0 || bits > 32)
{
errno = EINVAL;
- return (NULL);
+ return NULL;
}
if (bits == 0)
@@ -137,11 +137,11 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
if (size <= sizeof "/32")
goto emsgsize;
dst += SPRINTF((dst, "/%u", bits));
- return (odst);
+ return odst;
emsgsize:
errno = EMSGSIZE;
- return (NULL);
+ return NULL;
}
/*
@@ -182,7 +182,7 @@ inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size)
if (bits < 0 || bits > 128)
{
errno = EINVAL;
- return (NULL);
+ return NULL;
}
cp = outbuf;
@@ -286,9 +286,9 @@ inet_cidr_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size)
goto emsgsize;
strcpy(dst, outbuf);
- return (dst);
+ return dst;
emsgsize:
errno = EMSGSIZE;
- return (NULL);
+ return NULL;
}
diff --git a/src/backend/utils/adt/inet_net_pton.c b/src/backend/utils/adt/inet_net_pton.c
index be788d37cd0..6f3ece1209c 100644
--- a/src/backend/utils/adt/inet_net_pton.c
+++ b/src/backend/utils/adt/inet_net_pton.c
@@ -73,7 +73,7 @@ inet_net_pton(int af, const char *src, void *dst, size_t size)
inet_cidr_pton_ipv6(src, dst, size);
default:
errno = EAFNOSUPPORT;
- return (-1);
+ return -1;
}
}
@@ -228,15 +228,15 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size)
goto emsgsize;
*dst++ = '\0';
}
- return (bits);
+ return bits;
enoent:
errno = ENOENT;
- return (-1);
+ return -1;
emsgsize:
errno = EMSGSIZE;
- return (-1);
+ return -1;
}
/*
@@ -338,11 +338,11 @@ inet_net_pton_ipv4(const char *src, u_char *dst)
enoent:
errno = ENOENT;
- return (-1);
+ return -1;
emsgsize:
errno = EMSGSIZE;
- return (-1);
+ return -1;
}
static int
@@ -363,19 +363,19 @@ getbits(const char *src, int *bitsp)
if (pch != NULL)
{
if (n++ != 0 && val == 0) /* no leading zeros */
- return (0);
+ return 0;
val *= 10;
val += (pch - digits);
if (val > 128) /* range */
- return (0);
+ return 0;
continue;
}
- return (0);
+ return 0;
}
if (n == 0)
- return (0);
+ return 0;
*bitsp = val;
- return (1);
+ return 1;
}
static int
@@ -397,32 +397,32 @@ getv4(const char *src, u_char *dst, int *bitsp)
if (pch != NULL)
{
if (n++ != 0 && val == 0) /* no leading zeros */
- return (0);
+ return 0;
val *= 10;
val += (pch - digits);
if (val > 255) /* range */
- return (0);
+ return 0;
continue;
}
if (ch == '.' || ch == '/')
{
if (dst - odst > 3) /* too many octets? */
- return (0);
+ return 0;
*dst++ = val;
if (ch == '/')
- return (getbits(src, bitsp));
+ return getbits(src, bitsp);
val = 0;
n = 0;
continue;
}
- return (0);
+ return 0;
}
if (n == 0)
- return (0);
+ return 0;
if (dst - odst > 3) /* too many octets? */
- return (0);
+ return 0;
*dst++ = val;
- return (1);
+ return 1;
}
static int
@@ -552,13 +552,13 @@ inet_cidr_pton_ipv6(const char *src, u_char *dst, size_t size)
*/
memcpy(dst, tmp, NS_IN6ADDRSZ);
- return (bits);
+ return bits;
enoent:
errno = ENOENT;
- return (-1);
+ return -1;
emsgsize:
errno = EMSGSIZE;
- return (-1);
+ return -1;
}
diff --git a/src/backend/utils/adt/tsgistidx.c b/src/backend/utils/adt/tsgistidx.c
index 7ce2699b5c2..d8b86f63931 100644
--- a/src/backend/utils/adt/tsgistidx.c
+++ b/src/backend/utils/adt/tsgistidx.c
@@ -317,14 +317,14 @@ checkcondition_arr(void *checkval, QueryOperand *val, ExecPhraseData *data)
{
StopMiddle = StopLow + (StopHigh - StopLow) / 2;
if (*StopMiddle == val->valcrc)
- return (true);
+ return true;
else if (*StopMiddle < val->valcrc)
StopLow = StopMiddle + 1;
else
StopHigh = StopMiddle;
}
- return (false);
+ return false;
}
static bool
diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm
index 43cadf5303b..22d02ca485f 100644
--- a/src/backend/utils/mb/Unicode/convutils.pm
+++ b/src/backend/utils/mb/Unicode/convutils.pm
@@ -812,7 +812,7 @@ sub ucs2utf
(((($ucs & 0x3ffff) >> 12) | 0x80) << 16) |
(((($ucs & 0x0fc0) >> 6) | 0x80) << 8) | (($ucs & 0x003f) | 0x80);
}
- return ($utf);
+ return $utf;
}
1;
diff --git a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c
index 1d9b10f8a7a..68f76aa8cb8 100644
--- a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c
+++ b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c
@@ -361,14 +361,14 @@ CNStoBIG5(unsigned short cns, unsigned char lc)
for (i = 0; i < sizeof(b2c3) / (sizeof(unsigned short) * 2); i++)
{
if (b2c3[i][1] == cns)
- return (b2c3[i][0]);
+ return b2c3[i][0];
}
break;
case LC_CNS11643_4:
for (i = 0; i < sizeof(b1c4) / (sizeof(unsigned short) * 2); i++)
{
if (b1c4[i][1] == cns)
- return (b1c4[i][0]);
+ return b1c4[i][0];
}
default:
break;
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 2508ed9b8f4..e9bcb4cde25 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -79,7 +79,7 @@ deccall2(decimal *arg1, decimal *arg2, int (*ptr) (numeric *, numeric *))
PGTYPESnumeric_free(a1);
PGTYPESnumeric_free(a2);
- return (i);
+ return i;
}
static int
@@ -143,7 +143,7 @@ deccall3(decimal *arg1, decimal *arg2, decimal *result, int (*ptr) (numeric *, n
PGTYPESnumeric_free(a1);
PGTYPESnumeric_free(a2);
- return (i);
+ return i;
}
/* we start with the numeric functions */
@@ -166,7 +166,7 @@ decadd(decimal *arg1, decimal *arg2, decimal *sum)
int
deccmp(decimal *arg1, decimal *arg2)
{
- return (deccall2(arg1, arg2, PGTYPESnumeric_cmp));
+ return deccall2(arg1, arg2, PGTYPESnumeric_cmp);
}
void
@@ -261,7 +261,7 @@ deccvdbl(double dbl, decimal *np)
result = PGTYPESnumeric_to_decimal(nres, np);
PGTYPESnumeric_free(nres);
- return (result);
+ return result;
}
int
@@ -283,7 +283,7 @@ deccvint(int in, decimal *np)
result = PGTYPESnumeric_to_decimal(nres, np);
PGTYPESnumeric_free(nres);
- return (result);
+ return result;
}
int
@@ -305,7 +305,7 @@ deccvlong(long lng, decimal *np)
result = PGTYPESnumeric_to_decimal(nres, np);
PGTYPESnumeric_free(nres);
- return (result);
+ return result;
}
int
@@ -598,7 +598,7 @@ rmdyjul(short mdy[3], date * d)
int
rdayofweek(date d)
{
- return (PGTYPESdate_dayofweek(d));
+ return PGTYPESdate_dayofweek(d);
}
/* And the datetime stuff */
@@ -1049,5 +1049,5 @@ rsetnull(int t, char *ptr)
int
risnull(int t, char *ptr)
{
- return (ECPGis_noind_null(t, ptr));
+ return ECPGis_noind_null(t, ptr);
}
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c
index 0716abdd7e1..71fa2753638 100644
--- a/src/interfaces/ecpg/ecpglib/connect.c
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -67,7 +67,7 @@ ecpg_get_connection_nr(const char *connection_name)
ret = con;
}
- return (ret);
+ return ret;
}
struct connection *
@@ -106,7 +106,7 @@ ecpg_get_connection(const char *connection_name)
#endif
}
- return (ret);
+ return ret;
}
static void
@@ -168,7 +168,7 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
PGresult *results;
if (!ecpg_init(con, connection_name, lineno))
- return (false);
+ return false;
ecpg_log("ECPGsetcommit on line %d: action \"%s\"; connection \"%s\"\n", lineno, mode, con->name);
@@ -204,7 +204,7 @@ ECPGsetconn(int lineno, const char *connection_name)
struct connection *con = ecpg_get_connection(connection_name);
if (!ecpg_init(con, connection_name, lineno))
- return (false);
+ return false;
#ifdef ENABLE_THREAD_SAFETY
pthread_setspecific(actual_connection_key, con);
@@ -675,7 +675,7 @@ ECPGdisconnect(int lineno, const char *connection_name)
{
ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
- return (false);
+ return false;
}
#ifdef ENABLE_THREAD_SAFETY
@@ -702,7 +702,7 @@ ECPGdisconnect(int lineno, const char *connection_name)
#ifdef ENABLE_THREAD_SAFETY
pthread_mutex_unlock(&connections_mutex);
#endif
- return (false);
+ return false;
}
else
ecpg_finish(con);
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c
index 5dbfded8733..a2f3916f382 100644
--- a/src/interfaces/ecpg/ecpglib/data.c
+++ b/src/interfaces/ecpg/ecpglib/data.c
@@ -134,7 +134,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
- return (false);
+ return false;
}
/*
@@ -156,7 +156,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
* at least one tuple, but let's play it safe.
*/
ecpg_raise(lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL);
- return (false);
+ return false;
}
/* We will have to decode the value */
@@ -204,7 +204,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
ecpg_raise(lineno, ECPG_MISSING_INDICATOR,
ECPG_SQLSTATE_NULL_VALUE_NO_INDICATOR_PARAMETER,
NULL);
- return (false);
+ return false;
}
}
break;
@@ -212,12 +212,12 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
ecpg_raise(lineno, ECPG_UNSUPPORTED,
ECPG_SQLSTATE_ECPG_INTERNAL_ERROR,
ecpg_type_name(ind_type));
- return (false);
+ return false;
break;
}
if (value_for_indicator == -1)
- return (true);
+ return true;
/* let's check if it really is an array if it should be one */
if (isarray == ECPG_ARRAY_ARRAY)
@@ -226,7 +226,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_DATA_NOT_ARRAY,
ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL);
- return (false);
+ return false;
}
switch (type)
@@ -307,7 +307,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_INT_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
pval = scan_length;
@@ -336,7 +336,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_UINT_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
pval = scan_length;
@@ -364,7 +364,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
if (garbage_left(isarray, scan_length, compat))
{
ecpg_raise(lineno, ECPG_INT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
pval = scan_length;
@@ -376,7 +376,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
if (garbage_left(isarray, scan_length, compat))
{
ecpg_raise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
pval = scan_length;
@@ -399,7 +399,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_FLOAT_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
pval = scan_length;
@@ -438,7 +438,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
ecpg_raise(lineno, ECPG_CONVERT_BOOL,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
break;
case ECPGt_char:
@@ -581,14 +581,14 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
- return (false);
+ return false;
}
}
else
{
ecpg_raise(lineno, ECPG_NUMERIC_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
}
else
@@ -598,7 +598,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
free(nres);
ecpg_raise(lineno, ECPG_NUMERIC_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
}
pval = scan_length;
@@ -635,7 +635,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
*/
ires = (interval *) ecpg_alloc(sizeof(interval), lineno);
if (!ires)
- return (false);
+ return false;
ECPGset_noind_null(ECPGt_interval, ires);
}
@@ -643,7 +643,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_INTERVAL_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
}
else
@@ -656,7 +656,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
free(ires);
ecpg_raise(lineno, ECPG_INTERVAL_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
}
pval = scan_length;
@@ -693,7 +693,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_DATE_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
}
else
@@ -705,7 +705,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_DATE_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
}
@@ -741,7 +741,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_TIMESTAMP_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
}
else
@@ -753,7 +753,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
{
ecpg_raise(lineno, ECPG_TIMESTAMP_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);
- return (false);
+ return false;
}
}
@@ -765,7 +765,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
ecpg_raise(lineno, ECPG_UNSUPPORTED,
ECPG_SQLSTATE_ECPG_INTERNAL_ERROR,
ecpg_type_name(type));
- return (false);
+ return false;
break;
}
if (ECPG_IS_ARRAY(isarray))
@@ -791,5 +791,5 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
}
} while (*pval != '\0' && !array_boundary(isarray, *pval));
- return (true);
+ return true;
}
diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c
index 1fa00b892f4..bdd25184dca 100644
--- a/src/interfaces/ecpg/ecpglib/descriptor.c
+++ b/src/interfaces/ecpg/ecpglib/descriptor.c
@@ -150,10 +150,10 @@ get_int_item(int lineno, void *var, enum ECPGttype vartype, int value)
break;
default:
ecpg_raise(lineno, ECPG_VAR_NOT_NUMERIC, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL);
- return (false);
+ return false;
}
- return (true);
+ return true;
}
static bool
@@ -195,7 +195,7 @@ set_int_item(int lineno, int *target, const void *var, enum ECPGttype vartype)
break;
default:
ecpg_raise(lineno, ECPG_VAR_NOT_NUMERIC, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL);
- return (false);
+ return false;
}
return true;
@@ -228,17 +228,17 @@ get_char_item(int lineno, void *var, enum ECPGttype vartype, char *value, int va
break;
default:
ecpg_raise(lineno, ECPG_VAR_NOT_CHAR, ECPG_SQLSTATE_RESTRICTED_DATA_TYPE_ATTRIBUTE_VIOLATION, NULL);
- return (false);
+ return false;
}
- return (true);
+ return true;
}
#define RETURN_IF_NO_DATA if (ntuples < 1) \
{ \
va_end(args); \
ecpg_raise(lineno, ECPG_NOT_FOUND, ECPG_SQLSTATE_NO_DATA, NULL); \
- return (false); \
+ return false; \
}
bool
@@ -265,7 +265,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!ECPGresult)
{
va_end(args);
- return (false);
+ return false;
}
ntuples = PQntuples(ECPGresult);
@@ -274,7 +274,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
{
ecpg_raise(lineno, ECPG_INVALID_DESCRIPTOR_INDEX, ECPG_SQLSTATE_INVALID_DESCRIPTOR_INDEX, NULL);
va_end(args);
- return (false);
+ return false;
}
ecpg_log("ECPGget_desc: reading items for tuple %d\n", index);
@@ -333,7 +333,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_char_item(lineno, var, vartype, PQfname(ECPGresult, index), varcharsize))
{
va_end(args);
- return (false);
+ return false;
}
ecpg_log("ECPGget_desc: NAME = %s\n", PQfname(ECPGresult, index));
@@ -343,7 +343,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, 1))
{
va_end(args);
- return (false);
+ return false;
}
break;
@@ -352,7 +352,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, 0))
{
va_end(args);
- return (false);
+ return false;
}
break;
@@ -361,7 +361,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, (PQfmod(ECPGresult, index) - VARHDRSZ) & 0xffff))
{
va_end(args);
- return (false);
+ return false;
}
ecpg_log("ECPGget_desc: SCALE = %d\n", (PQfmod(ECPGresult, index) - VARHDRSZ) & 0xffff);
@@ -371,7 +371,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, PQfmod(ECPGresult, index) >> 16))
{
va_end(args);
- return (false);
+ return false;
}
ecpg_log("ECPGget_desc: PRECISION = %d\n", PQfmod(ECPGresult, index) >> 16);
@@ -381,7 +381,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, PQfsize(ECPGresult, index)))
{
va_end(args);
- return (false);
+ return false;
}
ecpg_log("ECPGget_desc: OCTET_LENGTH = %d\n", PQfsize(ECPGresult, index));
@@ -391,7 +391,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, PQfmod(ECPGresult, index) - VARHDRSZ))
{
va_end(args);
- return (false);
+ return false;
}
ecpg_log("ECPGget_desc: LENGTH = %d\n", PQfmod(ECPGresult, index) - VARHDRSZ);
@@ -401,7 +401,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, ecpg_dynamic_type(PQftype(ECPGresult, index))))
{
va_end(args);
- return (false);
+ return false;
}
ecpg_log("ECPGget_desc: TYPE = %d\n", ecpg_dynamic_type(PQftype(ECPGresult, index)));
@@ -411,7 +411,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, ecpg_dynamic_type_DDT(PQftype(ECPGresult, index))))
{
va_end(args);
- return (false);
+ return false;
}
ecpg_log("ECPGget_desc: TYPE = %d\n", ecpg_dynamic_type_DDT(PQftype(ECPGresult, index)));
@@ -421,7 +421,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, PQntuples(ECPGresult)))
{
va_end(args);
- return (false);
+ return false;
}
ecpg_log("ECPGget_desc: CARDINALITY = %d\n", PQntuples(ECPGresult));
@@ -462,7 +462,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, var, vartype, PQgetlength(ECPGresult, act_tuple, index)))
{
va_end(args);
- return (false);
+ return false;
}
var = (char *) var + offset;
ecpg_log("ECPGget_desc: RETURNED[%d] = %d\n", act_tuple, PQgetlength(ECPGresult, act_tuple, index));
@@ -473,7 +473,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
snprintf(type_str, sizeof(type_str), "%d", type);
ecpg_raise(lineno, ECPG_UNKNOWN_DESCRIPTOR_ITEM, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, type_str);
va_end(args);
- return (false);
+ return false;
}
type = va_arg(args, enum ECPGdtype);
@@ -539,7 +539,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
if (!get_int_item(lineno, data_var.ind_value, data_var.ind_type, -PQgetisnull(ECPGresult, act_tuple, index)))
{
va_end(args);
- return (false);
+ return false;
}
data_var.ind_value = (char *) data_var.ind_value + data_var.ind_offset;
ecpg_log("ECPGget_desc: INDICATOR[%d] = %d\n", act_tuple, -PQgetisnull(ECPGresult, act_tuple, index));
@@ -547,7 +547,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
}
sqlca->sqlerrd[2] = ntuples;
va_end(args);
- return (true);
+ return true;
}
#undef RETURN_IF_NO_DATA
diff --git a/src/interfaces/ecpg/ecpglib/error.c b/src/interfaces/ecpg/ecpglib/error.c
index 77d6cc2dae7..f34ae4afb83 100644
--- a/src/interfaces/ecpg/ecpglib/error.c
+++ b/src/interfaces/ecpg/ecpglib/error.c
@@ -286,23 +286,23 @@ ecpg_check_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMP
{
ecpg_log("ecpg_check_PQresult on line %d: no result - %s", lineno, PQerrorMessage(connection));
ecpg_raise_backend(lineno, NULL, connection, compat);
- return (false);
+ return false;
}
switch (PQresultStatus(results))
{
case PGRES_TUPLES_OK:
- return (true);
+ return true;
break;
case PGRES_EMPTY_QUERY:
/* do nothing */
ecpg_raise(lineno, ECPG_EMPTY, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, NULL);
PQclear(results);
- return (false);
+ return false;
break;
case PGRES_COMMAND_OK:
- return (true);
+ return true;
break;
case PGRES_NONFATAL_ERROR:
case PGRES_FATAL_ERROR:
@@ -310,23 +310,23 @@ ecpg_check_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMP
ecpg_log("ecpg_check_PQresult on line %d: bad response - %s", lineno, PQresultErrorMessage(results));
ecpg_raise_backend(lineno, results, connection, compat);
PQclear(results);
- return (false);
+ return false;
break;
case PGRES_COPY_OUT:
- return (true);
+ return true;
break;
case PGRES_COPY_IN:
ecpg_log("ecpg_check_PQresult on line %d: COPY IN data transfer in progress\n", lineno);
PQendcopy(connection);
PQclear(results);
- return (false);
+ return false;
break;
default:
ecpg_log("ecpg_check_PQresult on line %d: unknown execution status type\n",
lineno);
ecpg_raise_backend(lineno, results, connection, compat);
PQclear(results);
- return (false);
+ return false;
break;
}
}
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 03c55d35930..50f831aa2b0 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -58,7 +58,7 @@ quote_postgres(char *arg, bool quote, int lineno)
buffer_len = 2 * length + 1;
res = (char *) ecpg_alloc(buffer_len + 3, lineno);
if (!res)
- return (res);
+ return res;
escaped_len = PQescapeString(res + 1, arg, buffer_len);
if (length == escaped_len)
{
@@ -151,13 +151,13 @@ ecpg_type_infocache_push(struct ECPGtype_information_cache **cache, int oid, enu
= (struct ECPGtype_information_cache *) ecpg_alloc(sizeof(struct ECPGtype_information_cache), lineno);
if (new_entry == NULL)
- return (false);
+ return false;
new_entry->oid = oid;
new_entry->isarray = isarray;
new_entry->next = *cache;
*cache = new_entry;
- return (true);
+ return true;
}
static enum ARRAY_TYPE
@@ -178,89 +178,89 @@ ecpg_is_type_an_array(int type, const struct statement *stmt, const struct varia
/* populate cache with well known types to speed things up */
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BOOLOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BYTEAOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CHAROID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), NAMEOID, not_an_array_in_ecpg, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT8OID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT2OID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT2VECTOROID, ECPG_ARRAY_VECTOR, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INT4OID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), REGPROCOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TEXTOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), OIDOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIDOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), XIDOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIDOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), OIDVECTOROID, ECPG_ARRAY_VECTOR, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), POINTOID, ECPG_ARRAY_VECTOR, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), LSEGOID, ECPG_ARRAY_VECTOR, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), PATHOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BOXOID, ECPG_ARRAY_VECTOR, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), POLYGONOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), LINEOID, ECPG_ARRAY_VECTOR, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), FLOAT4OID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), FLOAT8OID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), ABSTIMEOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), RELTIMEOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TINTERVALOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), UNKNOWNOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIRCLEOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CASHOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INETOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), CIDROID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), BPCHAROID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), VARCHAROID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), DATEOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMEOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMESTAMPOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMESTAMPTZOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), INTERVALOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), TIMETZOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), ZPBITOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), VARBITOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
if (!ecpg_type_infocache_push(&(stmt->connection->cache_head), NUMERICOID, ECPG_ARRAY_NONE, stmt->lineno))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
}
for (cache_entry = (stmt->connection->cache_head); cache_entry != NULL; cache_entry = cache_entry->next)
@@ -271,13 +271,13 @@ ecpg_is_type_an_array(int type, const struct statement *stmt, const struct varia
array_query = (char *) ecpg_alloc(strlen("select typlen from pg_type where oid= and typelem<>0") + 11, stmt->lineno);
if (array_query == NULL)
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
sprintf(array_query, "select typlen from pg_type where oid=%d and typelem<>0", type);
query = PQexec(stmt->connection->connection, array_query);
ecpg_free(array_query);
if (!ecpg_check_PQresult(query, stmt->lineno, stmt->connection->connection, stmt->compat))
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
else if (PQresultStatus(query) == PGRES_TUPLES_OK)
{
if (PQntuples(query) == 0)
@@ -297,7 +297,7 @@ ecpg_is_type_an_array(int type, const struct statement *stmt, const struct varia
PQclear(query);
}
else
- return (ECPG_ARRAY_ERROR);
+ return ECPG_ARRAY_ERROR;
ecpg_type_infocache_push(&(stmt->connection->cache_head), type, isarray, stmt->lineno);
ecpg_log("ecpg_is_type_an_array on line %d: type (%d); C (%d); array (%s)\n", stmt->lineno, type, var->type, ECPG_IS_ARRAY(isarray) ? "yes" : "no");
@@ -1486,7 +1486,7 @@ ecpg_process_output(struct statement *stmt, bool clear_result)
{
ecpg_raise(stmt->lineno, ECPG_OUT_OF_MEMORY,
ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
- return (false);
+ return false;
}
var = stmt->outlist;
@@ -1654,7 +1654,7 @@ ecpg_process_output(struct statement *stmt, bool clear_result)
else if (!INFORMIX_MODE(stmt->compat))
{
ecpg_raise(stmt->lineno, ECPG_TOO_FEW_ARGUMENTS, ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_TARGETS, NULL);
- return (false);
+ return false;
}
}
@@ -1830,7 +1830,7 @@ ecpg_do_prologue(int lineno, const int compat, const int force_indicator,
{
ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command);
ecpg_do_epilogue(stmt);
- return (false);
+ return false;
}
}
diff --git a/src/interfaces/ecpg/ecpglib/memory.c b/src/interfaces/ecpg/ecpglib/memory.c
index a7268bb0f6c..dc548a4cdab 100644
--- a/src/interfaces/ecpg/ecpglib/memory.c
+++ b/src/interfaces/ecpg/ecpglib/memory.c
@@ -26,7 +26,7 @@ ecpg_alloc(long size, int lineno)
return NULL;
}
- return (new);
+ return new;
}
char *
@@ -40,7 +40,7 @@ ecpg_realloc(void *ptr, long size, int lineno)
return NULL;
}
- return (new);
+ return new;
}
char *
@@ -58,7 +58,7 @@ ecpg_strdup(const char *string, int lineno)
return NULL;
}
- return (new);
+ return new;
}
/* keep a list of memory we allocated for the user */
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index edd7302d546..2084d7fe606 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -110,7 +110,7 @@ ecpg_init(const struct connection *con, const char *connection_name, const int l
{
ecpg_raise(lineno, ECPG_OUT_OF_MEMORY, ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY,
NULL);
- return (false);
+ return false;
}
ecpg_init_sqlca(sqlca);
@@ -118,10 +118,10 @@ ecpg_init(const struct connection *con, const char *connection_name, const int l
{
ecpg_raise(lineno, ECPG_NO_CONN, ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST,
connection_name ? connection_name : ecpg_gettext("NULL"));
- return (false);
+ return false;
}
- return (true);
+ return true;
}
#ifdef ENABLE_THREAD_SAFETY
@@ -155,9 +155,9 @@ ECPGget_sqlca(void)
ecpg_init_sqlca(sqlca);
pthread_setspecific(sqlca_key, sqlca);
}
- return (sqlca);
+ return sqlca;
#else
- return (&sqlca);
+ return &sqlca;
#endif
}
@@ -167,7 +167,7 @@ ECPGstatus(int lineno, const char *connection_name)
struct connection *con = ecpg_get_connection(connection_name);
if (!ecpg_init(con, connection_name, lineno))
- return (false);
+ return false;
/* are we connected? */
if (con->connection == NULL)
@@ -176,7 +176,7 @@ ECPGstatus(int lineno, const char *connection_name)
return false;
}
- return (true);
+ return true;
}
PGTransactionStatusType
@@ -202,7 +202,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
struct connection *con = ecpg_get_connection(connection_name);
if (!ecpg_init(con, connection_name, lineno))
- return (false);
+ return false;
ecpg_log("ECPGtrans on line %d: action \"%s\"; connection \"%s\"\n", lineno, transaction, con ? con->name : "null");
@@ -419,10 +419,10 @@ ECPGis_noind_null(enum ECPGttype type, void *ptr)
break;
#endif /* HAVE_LONG_LONG_INT */
case ECPGt_float:
- return (_check(ptr, sizeof(float)));
+ return _check(ptr, sizeof(float));
break;
case ECPGt_double:
- return (_check(ptr, sizeof(double)));
+ return _check(ptr, sizeof(double));
break;
case ECPGt_varchar:
if (*(((struct ECPGgeneric_varchar *) ptr)->arr) == 0x00)
@@ -437,10 +437,10 @@ ECPGis_noind_null(enum ECPGttype type, void *ptr)
return true;
break;
case ECPGt_interval:
- return (_check(ptr, sizeof(interval)));
+ return _check(ptr, sizeof(interval));
break;
case ECPGt_timestamp:
- return (_check(ptr, sizeof(timestamp)));
+ return _check(ptr, sizeof(timestamp));
break;
default:
break;
diff --git a/src/interfaces/ecpg/ecpglib/prepare.c b/src/interfaces/ecpg/ecpglib/prepare.c
index 151aa80dc66..e76b645024e 100644
--- a/src/interfaces/ecpg/ecpglib/prepare.c
+++ b/src/interfaces/ecpg/ecpglib/prepare.c
@@ -42,7 +42,7 @@ isvarchar(unsigned char c)
if (c >= 128)
return true;
- return (false);
+ return false;
}
static bool
@@ -371,7 +371,7 @@ SearchStmtCache(const char *ecpgQuery)
if (entIx >= stmtCacheEntPerBucket)
entNo = 0;
- return (entNo);
+ return entNo;
}
/*
@@ -389,14 +389,14 @@ ecpg_freeStmtCacheEntry(int lineno, int compat, int entNo) /* entry # to free */
entry = &stmtCacheEntries[entNo];
if (!entry->stmtID[0]) /* return if the entry isn't in use */
- return (0);
+ return 0;
con = ecpg_get_connection(entry->connection);
/* free the 'prepared_statement' list entry */
this = ecpg_find_prepared_statement(entry->stmtID, con, &prev);
if (this && !deallocate_one(lineno, compat, con, prev, this))
- return (-1);
+ return -1;
entry->stmtID[0] = '\0';
@@ -407,7 +407,7 @@ ecpg_freeStmtCacheEntry(int lineno, int compat, int entNo) /* entry # to free */
entry->ecpgQuery = 0;
}
- return (entNo);
+ return entNo;
}
/*
@@ -450,7 +450,7 @@ AddStmtToCache(int lineno, /* line # of statement */
/* 'entNo' is the entry to use - make sure its free */
if (ecpg_freeStmtCacheEntry(lineno, compat, entNo) < 0)
- return (-1);
+ return -1;
/* add the query to the entry */
entry = &stmtCacheEntries[entNo];
@@ -460,7 +460,7 @@ AddStmtToCache(int lineno, /* line # of statement */
entry->execs = 0;
memcpy(entry->stmtID, stmtID, sizeof(entry->stmtID));
- return (entNo);
+ return entNo;
}
/* handle cache and preparation of statements in auto-prepare mode */
@@ -487,7 +487,7 @@ ecpg_auto_prepare(int lineno, const char *connection_name, const int compat, cha
prep = ecpg_find_prepared_statement(stmtID, con, NULL);
/* This prepared name doesn't exist on this connection. */
if (!prep && !prepare_common(lineno, con, stmtID, query))
- return (false);
+ return false;
*name = ecpg_strdup(stmtID, lineno);
}
@@ -501,9 +501,9 @@ ecpg_auto_prepare(int lineno, const char *connection_name, const int compat, cha
sprintf(stmtID, "ecpg%d", nextStmtID++);
if (!ECPGprepare(lineno, connection_name, 0, stmtID, query))
- return (false);
+ return false;
if (AddStmtToCache(lineno, stmtID, connection_name, compat, query) < 0)
- return (false);
+ return false;
*name = ecpg_strdup(stmtID, lineno);
}
@@ -511,5 +511,5 @@ ecpg_auto_prepare(int lineno, const char *connection_name, const int compat, cha
/* increase usage counter */
stmtCacheEntries[entNo].execs++;
- return (true);
+ return true;
}
diff --git a/src/interfaces/ecpg/pgtypeslib/common.c b/src/interfaces/ecpg/pgtypeslib/common.c
index 9084fd06b4e..ae29b6c4ab8 100644
--- a/src/interfaces/ecpg/pgtypeslib/common.c
+++ b/src/interfaces/ecpg/pgtypeslib/common.c
@@ -12,7 +12,7 @@ pgtypes_alloc(long size)
if (!new)
errno = ENOMEM;
- return (new);
+ return new;
}
char *
@@ -22,7 +22,7 @@ pgtypes_strdup(const char *str)
if (!new)
errno = ENOMEM;
- return (new);
+ return new;
}
int
diff --git a/src/interfaces/ecpg/pgtypeslib/numeric.c b/src/interfaces/ecpg/pgtypeslib/numeric.c
index a93d074de21..a8619168ff8 100644
--- a/src/interfaces/ecpg/pgtypeslib/numeric.c
+++ b/src/interfaces/ecpg/pgtypeslib/numeric.c
@@ -40,7 +40,7 @@ apply_typmod(numeric *var, long typmod)
/* Do nothing if we have a default typmod (-1) */
if (typmod < (long) (VARHDRSZ))
- return (0);
+ return 0;
typmod -= VARHDRSZ;
precision = (typmod >> 16) & 0xffff;
@@ -100,7 +100,7 @@ apply_typmod(numeric *var, long typmod)
var->rscale = scale;
var->dscale = scale;
- return (0);
+ return 0;
}
#endif
@@ -296,7 +296,7 @@ set_var_from_str(char *str, char **ptr, numeric *dest)
dest->weight = 0;
dest->rscale = dest->dscale;
- return (0);
+ return 0;
}
@@ -412,16 +412,16 @@ PGTYPESnumeric_from_asc(char *str, char **endptr)
char **ptr = (endptr != NULL) ? endptr : &realptr;
if (!value)
- return (NULL);
+ return NULL;
ret = set_var_from_str(str, ptr, value);
if (ret)
{
PGTYPESnumeric_free(value);
- return (NULL);
+ return NULL;
}
- return (value);
+ return value;
}
char *
@@ -445,7 +445,7 @@ PGTYPESnumeric_to_asc(numeric *num, int dscale)
/* get_str_from_var may change its argument */
s = get_str_from_var(numcopy, dscale);
PGTYPESnumeric_free(numcopy);
- return (s);
+ return s;
}
/* ----------
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index 78931399e69..fa5b32ed9da 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -224,14 +224,14 @@ PGTYPEStimestamp_from_asc(char *str, char **endptr)
if (strlen(str) > MAXDATELEN)
{
errno = PGTYPES_TS_BAD_TIMESTAMP;
- return (noresult);
+ return noresult;
}
if (ParseDateTime(str, lowstr, field, ftype, &nf, ptr) != 0 ||
DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, 0) != 0)
{
errno = PGTYPES_TS_BAD_TIMESTAMP;
- return (noresult);
+ return noresult;
}
switch (dtype)
@@ -240,7 +240,7 @@ PGTYPEStimestamp_from_asc(char *str, char **endptr)
if (tm2timestamp(tm, fsec, NULL, &result) != 0)
{
errno = PGTYPES_TS_BAD_TIMESTAMP;
- return (noresult);
+ return noresult;
}
break;
@@ -258,11 +258,11 @@ PGTYPEStimestamp_from_asc(char *str, char **endptr)
case DTK_INVALID:
errno = PGTYPES_TS_BAD_TIMESTAMP;
- return (noresult);
+ return noresult;
default:
errno = PGTYPES_TS_BAD_TIMESTAMP;
- return (noresult);
+ return noresult;
}
/* AdjustTimestampForTypmod(&result, typmod); */
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index bad0a667fc2..536185fa1c8 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -137,7 +137,7 @@ main(int argc, char *const argv[])
if (find_my_exec(argv[0], my_exec_path) < 0)
{
fprintf(stderr, _("%s: could not locate my own executable path\n"), argv[0]);
- return (ILLEGAL_OPTION);
+ return ILLEGAL_OPTION;
}
if (argc > 1)
@@ -266,7 +266,7 @@ main(int argc, char *const argv[])
{
fprintf(stderr, _("%s: no input files specified\n"), progname);
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]);
- return (ILLEGAL_OPTION);
+ return ILLEGAL_OPTION;
}
else
{
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
index 2562366bbed..e28d7e694dd 100644
--- a/src/interfaces/ecpg/preproc/ecpg.header
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -142,7 +142,7 @@ cat2_str(char *str1, char *str2)
strcat(res_str, str2);
free(str1);
free(str2);
- return(res_str);
+ return res_str;
}
static char *
@@ -162,7 +162,7 @@ cat_str(int count, ...)
va_end(args);
- return(res_str);
+ return res_str;
}
static char *
@@ -174,7 +174,7 @@ make2_str(char *str1, char *str2)
strcat(res_str, str2);
free(str1);
free(str2);
- return(res_str);
+ return res_str;
}
static char *
@@ -188,7 +188,7 @@ make3_str(char *str1, char *str2, char *str3)
free(str1);
free(str2);
free(str3);
- return(res_str);
+ return res_str;
}
/* and the rest */
@@ -233,7 +233,7 @@ create_questionmarks(char *name, bool array)
/* removed the trailing " ," */
result[strlen(result)-3] = '\0';
- return(result);
+ return result;
}
static char *
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index 3598a200d0d..fc450f30ab4 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -768,7 +768,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
}
<SQL>:{identifier}((("->"|\.){identifier})|(\[{array}\]))* {
base_yylval.str = mm_strdup(yytext+1);
- return(CVARIABLE);
+ return CVARIABLE;
}
<SQL>{identifier} {
const ScanKeyword *keyword;
@@ -832,7 +832,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
base_yylval.str = mm_strdup(yytext);
- return(CPP_LINE);
+ return CPP_LINE;
}
}
<C>{cppinclude_next} {
@@ -844,12 +844,12 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
base_yylval.str = mm_strdup(yytext);
- return(CPP_LINE);
+ return CPP_LINE;
}
}
<C,SQL>{cppline} {
base_yylval.str = mm_strdup(yytext);
- return(CPP_LINE);
+ return CPP_LINE;
}
<C>{identifier} {
const ScanKeyword *keyword;
@@ -879,38 +879,38 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
}
}
<C>{xcstop} { mmerror(PARSE_ERROR, ET_ERROR, "nested /* ... */ comments"); }
-<C>":" { return(':'); }
-<C>";" { return(';'); }
-<C>"," { return(','); }
-<C>"*" { return('*'); }
-<C>"%" { return('%'); }
-<C>"/" { return('/'); }
-<C>"+" { return('+'); }
-<C>"-" { return('-'); }
-<C>"(" { parenths_open++; return('('); }
-<C>")" { parenths_open--; return(')'); }
+<C>":" { return ':'; }
+<C>";" { return ';'; }
+<C>"," { return ','; }
+<C>"*" { return '*'; }
+<C>"%" { return '%'; }
+<C>"/" { return '/'; }
+<C>"+" { return '+'; }
+<C>"-" { return '-'; }
+<C>"(" { parenths_open++; return '('; }
+<C>")" { parenths_open--; return ')'; }
<C,xskip>{space} { ECHO; }
-<C>\{ { return('{'); }
-<C>\} { return('}'); }
-<C>\[ { return('['); }
-<C>\] { return(']'); }
-<C>\= { return('='); }
-<C>"->" { return(S_MEMBER); }
-<C>">>" { return(S_RSHIFT); }
-<C>"<<" { return(S_LSHIFT); }
-<C>"||" { return(S_OR); }
-<C>"&&" { return(S_AND); }
-<C>"++" { return(S_INC); }
-<C>"--" { return(S_DEC); }
-<C>"==" { return(S_EQUAL); }
-<C>"!=" { return(S_NEQUAL); }
-<C>"+=" { return(S_ADD); }
-<C>"-=" { return(S_SUB); }
-<C>"*=" { return(S_MUL); }
-<C>"/=" { return(S_DIV); }
-<C>"%=" { return(S_MOD); }
-<C>"->*" { return(S_MEMPOINT); }
-<C>".*" { return(S_DOTPOINT); }
+<C>\{ { return '{'; }
+<C>\} { return '}'; }
+<C>\[ { return '['; }
+<C>\] { return ']'; }
+<C>\= { return '='; }
+<C>"->" { return S_MEMBER; }
+<C>">>" { return S_RSHIFT; }
+<C>"<<" { return S_LSHIFT; }
+<C>"||" { return S_OR; }
+<C>"&&" { return S_AND; }
+<C>"++" { return S_INC; }
+<C>"--" { return S_DEC; }
+<C>"==" { return S_EQUAL; }
+<C>"!=" { return S_NEQUAL; }
+<C>"+=" { return S_ADD; }
+<C>"-=" { return S_SUB; }
+<C>"*=" { return S_MUL; }
+<C>"/=" { return S_DIV; }
+<C>"%=" { return S_MOD; }
+<C>"->*" { return S_MEMPOINT; }
+<C>".*" { return S_DOTPOINT; }
<C>{other} { return S_ANYTHING; }
<C>{exec_sql}{define}{space}* { BEGIN(def_ident); }
<C>{informix_special}{define}{space}* {
@@ -922,7 +922,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
yyless(1);
- return (S_ANYTHING);
+ return S_ANYTHING;
}
}
<C>{exec_sql}{undef}{space}* { BEGIN(undef); }
@@ -935,7 +935,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
yyless(1);
- return (S_ANYTHING);
+ return S_ANYTHING;
}
}
<undef>{identifier}{space}*";" {
@@ -984,7 +984,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
yyless(1);
- return (S_ANYTHING);
+ return S_ANYTHING;
}
}
<C,xskip>{exec_sql}{ifdef}{space}* { ifcond = TRUE; BEGIN(xcond); }
@@ -998,7 +998,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
yyless(1);
- return (S_ANYTHING);
+ return S_ANYTHING;
}
}
<C,xskip>{exec_sql}{ifndef}{space}* { ifcond = FALSE; BEGIN(xcond); }
@@ -1012,7 +1012,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
yyless(1);
- return (S_ANYTHING);
+ return S_ANYTHING;
}
}
<C,xskip>{exec_sql}{elif}{space}* { /* pop stack */
@@ -1043,7 +1043,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
yyless(1);
- return (S_ANYTHING);
+ return S_ANYTHING;
}
}
@@ -1085,7 +1085,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
yyless(1);
- return (S_ANYTHING);
+ return S_ANYTHING;
}
}
<C,xskip>{exec_sql}{endif}{space}*";" {
@@ -1116,7 +1116,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
else
{
yyless(1);
- return (S_ANYTHING);
+ return S_ANYTHING;
}
}
diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c
index 750cdf9c7ce..256a3c395c5 100644
--- a/src/interfaces/ecpg/preproc/type.c
+++ b/src/interfaces/ecpg/preproc/type.c
@@ -69,7 +69,7 @@ ECPGstruct_member_dup(struct ECPGstruct_member *rm)
rm = rm->next;
}
- return (new);
+ return new;
}
/* The NAME argument is copied. The type argument is preserved as a pointer. */
@@ -135,78 +135,78 @@ get_type(enum ECPGttype type)
switch (type)
{
case ECPGt_char:
- return ("ECPGt_char");
+ return "ECPGt_char";
break;
case ECPGt_unsigned_char:
- return ("ECPGt_unsigned_char");
+ return "ECPGt_unsigned_char";
break;
case ECPGt_short:
- return ("ECPGt_short");
+ return "ECPGt_short";
break;
case ECPGt_unsigned_short:
- return ("ECPGt_unsigned_short");
+ return "ECPGt_unsigned_short";
break;
case ECPGt_int:
- return ("ECPGt_int");
+ return "ECPGt_int";
break;
case ECPGt_unsigned_int:
- return ("ECPGt_unsigned_int");
+ return "ECPGt_unsigned_int";
break;
case ECPGt_long:
- return ("ECPGt_long");
+ return "ECPGt_long";
break;
case ECPGt_unsigned_long:
- return ("ECPGt_unsigned_long");
+ return "ECPGt_unsigned_long";
break;
case ECPGt_long_long:
- return ("ECPGt_long_long");
+ return "ECPGt_long_long";
break;
case ECPGt_unsigned_long_long:
- return ("ECPGt_unsigned_long_long");
+ return "ECPGt_unsigned_long_long";
break;
case ECPGt_float:
- return ("ECPGt_float");
+ return "ECPGt_float";
break;
case ECPGt_double:
- return ("ECPGt_double");
+ return "ECPGt_double";
break;
case ECPGt_bool:
- return ("ECPGt_bool");
+ return "ECPGt_bool";
break;
case ECPGt_varchar:
- return ("ECPGt_varchar");
+ return "ECPGt_varchar";
case ECPGt_NO_INDICATOR: /* no indicator */
- return ("ECPGt_NO_INDICATOR");
+ return "ECPGt_NO_INDICATOR";
break;
case ECPGt_char_variable: /* string that should not be quoted */
- return ("ECPGt_char_variable");
+ return "ECPGt_char_variable";
break;
case ECPGt_const: /* constant string quoted */
- return ("ECPGt_const");
+ return "ECPGt_const";
break;
case ECPGt_decimal:
- return ("ECPGt_decimal");
+ return "ECPGt_decimal";
break;
case ECPGt_numeric:
- return ("ECPGt_numeric");
+ return "ECPGt_numeric";
break;
case ECPGt_interval:
- return ("ECPGt_interval");
+ return "ECPGt_interval";
break;
case ECPGt_descriptor:
- return ("ECPGt_descriptor");
+ return "ECPGt_descriptor";
break;
case ECPGt_sqlda:
- return ("ECPGt_sqlda");
+ return "ECPGt_sqlda";
break;
case ECPGt_date:
- return ("ECPGt_date");
+ return "ECPGt_date";
break;
case ECPGt_timestamp:
- return ("ECPGt_timestamp");
+ return "ECPGt_timestamp";
break;
case ECPGt_string:
- return ("ECPGt_string");
+ return "ECPGt_string";
break;
default:
mmerror(PARSE_ERROR, ET_ERROR, "unrecognized variable type code %d", type);
@@ -674,51 +674,51 @@ get_dtype(enum ECPGdtype type)
switch (type)
{
case ECPGd_count:
- return ("ECPGd_countr");
+ return "ECPGd_countr";
break;
case ECPGd_data:
- return ("ECPGd_data");
+ return "ECPGd_data";
break;
case ECPGd_di_code:
- return ("ECPGd_di_code");
+ return "ECPGd_di_code";
break;
case ECPGd_di_precision:
- return ("ECPGd_di_precision");
+ return "ECPGd_di_precision";
break;
case ECPGd_indicator:
- return ("ECPGd_indicator");
+ return "ECPGd_indicator";
break;
case ECPGd_key_member:
- return ("ECPGd_key_member");
+ return "ECPGd_key_member";
break;
case ECPGd_length:
- return ("ECPGd_length");
+ return "ECPGd_length";
break;
case ECPGd_name:
- return ("ECPGd_name");
+ return "ECPGd_name";
break;
case ECPGd_nullable:
- return ("ECPGd_nullable");
+ return "ECPGd_nullable";
break;
case ECPGd_octet:
- return ("ECPGd_octet");
+ return "ECPGd_octet";
break;
case ECPGd_precision:
- return ("ECPGd_precision");
+ return "ECPGd_precision";
break;
case ECPGd_ret_length:
- return ("ECPGd_ret_length");
+ return "ECPGd_ret_length";
case ECPGd_ret_octet:
- return ("ECPGd_ret_octet");
+ return "ECPGd_ret_octet";
break;
case ECPGd_scale:
- return ("ECPGd_scale");
+ return "ECPGd_scale";
break;
case ECPGd_type:
- return ("ECPGd_type");
+ return "ECPGd_type";
break;
case ECPGd_cardinality:
- return ("ECPGd_cardinality");
+ return "ECPGd_cardinality";
default:
mmerror(PARSE_ERROR, ET_ERROR, "unrecognized descriptor item code %d", type);
}
diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c
index 31225738e03..39bf3b2474e 100644
--- a/src/interfaces/ecpg/preproc/variable.c
+++ b/src/interfaces/ecpg/preproc/variable.c
@@ -18,7 +18,7 @@ new_variable(const char *name, struct ECPGtype *type, int brace_level)
p->next = allvariables;
allvariables = p;
- return (p);
+ return p;
}
static struct variable *
@@ -44,12 +44,12 @@ find_struct_member(char *name, char *str, struct ECPGstruct_member *members, int
switch (members->type->type)
{
case ECPGt_array:
- return (new_variable(name, ECPGmake_array_type(ECPGmake_simple_type(members->type->u.element->type, members->type->u.element->size, members->type->u.element->counter), members->type->size), brace_level));
+ return new_variable(name, ECPGmake_array_type(ECPGmake_simple_type(members->type->u.element->type, members->type->u.element->size, members->type->u.element->counter), members->type->size), brace_level);
case ECPGt_struct:
case ECPGt_union:
- return (new_variable(name, ECPGmake_struct_type(members->type->u.members, members->type->type, members->type->type_name, members->type->struct_sizeof), brace_level));
+ return new_variable(name, ECPGmake_struct_type(members->type->u.members, members->type->type, members->type->type_name, members->type->struct_sizeof), brace_level);
default:
- return (new_variable(name, ECPGmake_simple_type(members->type->type, members->type->size, members->type->counter), brace_level));
+ return new_variable(name, ECPGmake_simple_type(members->type->type, members->type->size, members->type->counter), brace_level);
}
}
else
@@ -91,26 +91,26 @@ find_struct_member(char *name, char *str, struct ECPGstruct_member *members, int
switch (members->type->u.element->type)
{
case ECPGt_array:
- return (new_variable(name, ECPGmake_array_type(ECPGmake_simple_type(members->type->u.element->u.element->type, members->type->u.element->u.element->size, members->type->u.element->u.element->counter), members->type->u.element->size), brace_level));
+ return new_variable(name, ECPGmake_array_type(ECPGmake_simple_type(members->type->u.element->u.element->type, members->type->u.element->u.element->size, members->type->u.element->u.element->counter), members->type->u.element->size), brace_level);
case ECPGt_struct:
case ECPGt_union:
- return (new_variable(name, ECPGmake_struct_type(members->type->u.element->u.members, members->type->u.element->type, members->type->u.element->type_name, members->type->u.element->struct_sizeof), brace_level));
+ return new_variable(name, ECPGmake_struct_type(members->type->u.element->u.members, members->type->u.element->type, members->type->u.element->type_name, members->type->u.element->struct_sizeof), brace_level);
default:
- return (new_variable(name, ECPGmake_simple_type(members->type->u.element->type, members->type->u.element->size, members->type->u.element->counter), brace_level));
+ return new_variable(name, ECPGmake_simple_type(members->type->u.element->type, members->type->u.element->size, members->type->u.element->counter), brace_level);
}
break;
case '-':
if (members->type->type == ECPGt_array)
- return (find_struct_member(name, ++end, members->type->u.element->u.members, brace_level));
+ return find_struct_member(name, ++end, members->type->u.element->u.members, brace_level);
else
- return (find_struct_member(name, ++end, members->type->u.members, brace_level));
+ return find_struct_member(name, ++end, members->type->u.members, brace_level);
break;
break;
case '.':
if (members->type->type == ECPGt_array)
- return (find_struct_member(name, end, members->type->u.element->u.members, brace_level));
+ return find_struct_member(name, end, members->type->u.element->u.members, brace_level);
else
- return (find_struct_member(name, end, members->type->u.members, brace_level));
+ return find_struct_member(name, end, members->type->u.members, brace_level);
break;
default:
mmfatal(PARSE_ERROR, "incorrectly formed variable \"%s\"", name);
@@ -120,7 +120,7 @@ find_struct_member(char *name, char *str, struct ECPGstruct_member *members, int
}
}
- return (NULL);
+ return NULL;
}
static struct variable *
@@ -185,7 +185,7 @@ find_simple(char *name)
return p;
}
- return (NULL);
+ return NULL;
}
/* Note that this function will end the program in case of an unknown */
@@ -236,12 +236,12 @@ find_variable(char *name)
switch (p->type->u.element->type)
{
case ECPGt_array:
- return (new_variable(name, ECPGmake_array_type(ECPGmake_simple_type(p->type->u.element->u.element->type, p->type->u.element->u.element->size, p->type->u.element->u.element->counter), p->type->u.element->size), p->brace_level));
+ return new_variable(name, ECPGmake_array_type(ECPGmake_simple_type(p->type->u.element->u.element->type, p->type->u.element->u.element->size, p->type->u.element->u.element->counter), p->type->u.element->size), p->brace_level);
case ECPGt_struct:
case ECPGt_union:
- return (new_variable(name, ECPGmake_struct_type(p->type->u.element->u.members, p->type->u.element->type, p->type->u.element->type_name, p->type->u.element->struct_sizeof), p->brace_level));
+ return new_variable(name, ECPGmake_struct_type(p->type->u.element->u.members, p->type->u.element->type, p->type->u.element->type_name, p->type->u.element->struct_sizeof), p->brace_level);
default:
- return (new_variable(name, ECPGmake_simple_type(p->type->u.element->type, p->type->u.element->size, p->type->u.element->counter), p->brace_level));
+ return new_variable(name, ECPGmake_simple_type(p->type->u.element->type, p->type->u.element->size, p->type->u.element->counter), p->brace_level);
}
}
}
@@ -254,7 +254,7 @@ find_variable(char *name)
if (p == NULL)
mmfatal(PARSE_ERROR, "variable \"%s\" is not declared", name);
- return (p);
+ return p;
}
void
@@ -505,7 +505,7 @@ get_typedef(char *name)
if (!this)
mmfatal(PARSE_ERROR, "unrecognized data type name \"%s\"", name);
- return (this);
+ return this;
}
void
diff --git a/src/interfaces/ecpg/test/compat_informix/dec_test.pgc b/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
index b374bda724f..c6a4ed85ee7 100644
--- a/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
+++ b/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
@@ -206,7 +206,7 @@ main(void)
}
free(decarr);
- return (0);
+ return 0;
}
static void
diff --git a/src/interfaces/ecpg/test/compat_informix/describe.pgc b/src/interfaces/ecpg/test/compat_informix/describe.pgc
index 6fcccc6ab4d..4ee7254dff4 100644
--- a/src/interfaces/ecpg/test/compat_informix/describe.pgc
+++ b/src/interfaces/ecpg/test/compat_informix/describe.pgc
@@ -195,5 +195,5 @@ exec sql end declare section;
strcpy(msg, "disconnect");
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/compat_informix/rfmtdate.pgc b/src/interfaces/ecpg/test/compat_informix/rfmtdate.pgc
index c799de67624..f1a90488890 100644
--- a/src/interfaces/ecpg/test/compat_informix/rfmtdate.pgc
+++ b/src/interfaces/ecpg/test/compat_informix/rfmtdate.pgc
@@ -147,7 +147,7 @@ main(void)
/* ECPG_INFORMIX_BAD_YEAR */
/* ??? */
- return (0);
+ return 0;
}
static void
diff --git a/src/interfaces/ecpg/test/compat_informix/rfmtlong.pgc b/src/interfaces/ecpg/test/compat_informix/rfmtlong.pgc
index 162b42505f8..a1070e13311 100644
--- a/src/interfaces/ecpg/test/compat_informix/rfmtlong.pgc
+++ b/src/interfaces/ecpg/test/compat_informix/rfmtlong.pgc
@@ -45,7 +45,7 @@ main(void)
fmtlong(-8494493, "abc: ################+-+");
fmtlong(-8494493, "+<<<<,<<<,<<<,<<<");
- return (0);
+ return 0;
}
static void
diff --git a/src/interfaces/ecpg/test/compat_informix/sqlda.pgc b/src/interfaces/ecpg/test/compat_informix/sqlda.pgc
index e1142d2b220..423ce410890 100644
--- a/src/interfaces/ecpg/test/compat_informix/sqlda.pgc
+++ b/src/interfaces/ecpg/test/compat_informix/sqlda.pgc
@@ -246,5 +246,5 @@ exec sql end declare section;
strcpy(msg, "disconnect");
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/connect/test1.pgc b/src/interfaces/ecpg/test/connect/test1.pgc
index 4868b3dd81e..86633a7af69 100644
--- a/src/interfaces/ecpg/test/connect/test1.pgc
+++ b/src/interfaces/ecpg/test/connect/test1.pgc
@@ -61,5 +61,5 @@ exec sql end declare section;
exec sql connect to unix:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 identified by "wrongpw";
/* no disconnect necessary */
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/connect/test2.pgc b/src/interfaces/ecpg/test/connect/test2.pgc
index 0ced76ec6e5..f31a7f9bb07 100644
--- a/src/interfaces/ecpg/test/connect/test2.pgc
+++ b/src/interfaces/ecpg/test/connect/test2.pgc
@@ -42,5 +42,5 @@ exec sql end declare section;
/* disconnect from "second" */
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/connect/test3.pgc b/src/interfaces/ecpg/test/connect/test3.pgc
index ecf68d42acb..5d075f0e99d 100644
--- a/src/interfaces/ecpg/test/connect/test3.pgc
+++ b/src/interfaces/ecpg/test/connect/test3.pgc
@@ -48,5 +48,5 @@ exec sql end declare section;
* are used in other tests
*/
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/connect/test4.pgc b/src/interfaces/ecpg/test/connect/test4.pgc
index 185582ca2a5..b20b17471c6 100644
--- a/src/interfaces/ecpg/test/connect/test4.pgc
+++ b/src/interfaces/ecpg/test/connect/test4.pgc
@@ -16,5 +16,5 @@ main(void)
exec sql disconnect DEFAULT;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/connect/test5.pgc b/src/interfaces/ecpg/test/connect/test5.pgc
index d64ca50c93e..53b86556b15 100644
--- a/src/interfaces/ecpg/test/connect/test5.pgc
+++ b/src/interfaces/ecpg/test/connect/test5.pgc
@@ -72,5 +72,5 @@ exec sql end declare section;
/* not connected */
exec sql disconnect nonexistant;
- return (0);
+ return 0;
}
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 3b443e3ffdc..8951cdb227f 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
@@ -226,7 +226,7 @@ main(void)
}
free(decarr);
- return (0);
+ return 0;
}
static void
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-describe.c b/src/interfaces/ecpg/test/expected/compat_informix-describe.c
index 1b5aae0df7a..031a2d776ce 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-describe.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-describe.c
@@ -463,5 +463,5 @@ if (sqlca.sqlcode < 0) exit (1);}
#line 196 "describe.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c
index ac133c52efd..87a435e9bd2 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtdate.c
@@ -158,7 +158,7 @@ main(void)
/* ECPG_INFORMIX_BAD_YEAR */
/* ??? */
- return (0);
+ return 0;
}
static void
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c
index 5f44b35ee71..70e015a1301 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rfmtlong.c
@@ -56,7 +56,7 @@ main(void)
fmtlong(-8494493, "abc: ################+-+");
fmtlong(-8494493, "+<<<<,<<<,<<<,<<<");
- return (0);
+ return 0;
}
static void
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c
index 1df87f83ef0..fa2e569bbd4 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-sqlda.c
@@ -526,5 +526,5 @@ if (sqlca.sqlcode < 0) exit (1);}
#line 247 "sqlda.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/connect-test1.c b/src/interfaces/ecpg/test/expected/connect-test1.c
index 6471abb623e..18e5968d3ac 100644
--- a/src/interfaces/ecpg/test/expected/connect-test1.c
+++ b/src/interfaces/ecpg/test/expected/connect-test1.c
@@ -120,5 +120,5 @@ main(void)
/* no disconnect necessary */
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/connect-test2.c b/src/interfaces/ecpg/test/expected/connect-test2.c
index cf87c633860..deb7f191708 100644
--- a/src/interfaces/ecpg/test/expected/connect-test2.c
+++ b/src/interfaces/ecpg/test/expected/connect-test2.c
@@ -100,5 +100,5 @@ main(void)
#line 43 "test2.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/connect-test3.c b/src/interfaces/ecpg/test/expected/connect-test3.c
index 5bab6ba8f0c..1a74a069736 100644
--- a/src/interfaces/ecpg/test/expected/connect-test3.c
+++ b/src/interfaces/ecpg/test/expected/connect-test3.c
@@ -102,5 +102,5 @@ main(void)
* are used in other tests
*/
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/connect-test4.c b/src/interfaces/ecpg/test/expected/connect-test4.c
index e1ae3e9a660..ff13e4ec411 100644
--- a/src/interfaces/ecpg/test/expected/connect-test4.c
+++ b/src/interfaces/ecpg/test/expected/connect-test4.c
@@ -40,5 +40,5 @@ main(void)
#line 17 "test4.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/connect-test5.c b/src/interfaces/ecpg/test/expected/connect-test5.c
index e991ee79b63..4b6569e7633 100644
--- a/src/interfaces/ecpg/test/expected/connect-test5.c
+++ b/src/interfaces/ecpg/test/expected/connect-test5.c
@@ -158,5 +158,5 @@ main(void)
#line 73 "test5.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
index 00d43915b2d..6801669a0e1 100644
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test.c
@@ -449,5 +449,5 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
#line 366 "dt_test.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
index b6e77562b24..4024980f1ed 100644
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c
@@ -182,5 +182,5 @@ main(void)
PGTYPESinterval_free(i1);
}
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c
index ecd23431177..c8312840591 100644
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c
@@ -269,5 +269,5 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
#line 91 "nan_test.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
index 8019a8f63e7..47c320291f2 100644
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test.c
@@ -157,5 +157,5 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
#line 94 "num_test.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
index 83636ad8800..d31834e2c03 100644
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
@@ -228,7 +228,7 @@ main(void)
}
free(numarr);
- return (0);
+ return 0;
}
static void
diff --git a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
index c4ae862b499..1cf371092fe 100644
--- a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
+++ b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c
@@ -284,5 +284,5 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 92 "array_of_struct.pgc"
- return( 0 );
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/preproc-cursor.c b/src/interfaces/ecpg/test/expected/preproc-cursor.c
index f7da753a3df..48229017421 100644
--- a/src/interfaces/ecpg/test/expected/preproc-cursor.c
+++ b/src/interfaces/ecpg/test/expected/preproc-cursor.c
@@ -830,5 +830,5 @@ if (sqlca.sqlcode < 0) exit (1);}
#line 253 "cursor.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/preproc-define.c b/src/interfaces/ecpg/test/expected/preproc-define.c
index c8ae6f98dc2..bde15b74a0e 100644
--- a/src/interfaces/ecpg/test/expected/preproc-define.c
+++ b/src/interfaces/ecpg/test/expected/preproc-define.c
@@ -164,5 +164,5 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 59 "define.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/preproc-describe.c b/src/interfaces/ecpg/test/expected/preproc-describe.c
index 1a9dd85438e..143e9662618 100644
--- a/src/interfaces/ecpg/test/expected/preproc-describe.c
+++ b/src/interfaces/ecpg/test/expected/preproc-describe.c
@@ -477,5 +477,5 @@ if (sqlca.sqlcode < 0) exit (1);}
#line 144 "describe.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/preproc-outofscope.c b/src/interfaces/ecpg/test/expected/preproc-outofscope.c
index b3deb221d74..f4676a083a1 100644
--- a/src/interfaces/ecpg/test/expected/preproc-outofscope.c
+++ b/src/interfaces/ecpg/test/expected/preproc-outofscope.c
@@ -374,5 +374,5 @@ if (sqlca.sqlcode < 0) exit (1);}
#line 124 "outofscope.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c
index 5a0f9caee36..7b1f58e835f 100644
--- a/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c
+++ b/src/interfaces/ecpg/test/expected/preproc-pointer_to_struct.c
@@ -289,5 +289,5 @@ if (sqlca.sqlcode < 0) sqlprint();}
/* All the memory will anyway be freed at the end */
- return( 0 );
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/preproc-strings.c b/src/interfaces/ecpg/test/expected/preproc-strings.c
index 89d17e96c92..2053443e818 100644
--- a/src/interfaces/ecpg/test/expected/preproc-strings.c
+++ b/src/interfaces/ecpg/test/expected/preproc-strings.c
@@ -66,5 +66,5 @@ int main(void)
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 25 "strings.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.c b/src/interfaces/ecpg/test/expected/preproc-variable.c
index 7fd03ba7d39..08e2355d169 100644
--- a/src/interfaces/ecpg/test/expected/preproc-variable.c
+++ b/src/interfaces/ecpg/test/expected/preproc-variable.c
@@ -272,5 +272,5 @@ if (sqlca.sqlcode < 0) exit (1);}
#line 98 "variable.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/sql-array.c b/src/interfaces/ecpg/test/expected/sql-array.c
index 781c4267718..f5eb73d1852 100644
--- a/src/interfaces/ecpg/test/expected/sql-array.c
+++ b/src/interfaces/ecpg/test/expected/sql-array.c
@@ -351,5 +351,5 @@ if (sqlca.sqlcode < 0) sqlprint();}
free(t);
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/sql-describe.c b/src/interfaces/ecpg/test/expected/sql-describe.c
index 155e206f29d..b79a6f4016a 100644
--- a/src/interfaces/ecpg/test/expected/sql-describe.c
+++ b/src/interfaces/ecpg/test/expected/sql-describe.c
@@ -461,5 +461,5 @@ if (sqlca.sqlcode < 0) exit (1);}
#line 196 "describe.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/sql-execute.c b/src/interfaces/ecpg/test/expected/sql-execute.c
index aee3c1bcb75..cac91dc5999 100644
--- a/src/interfaces/ecpg/test/expected/sql-execute.c
+++ b/src/interfaces/ecpg/test/expected/sql-execute.c
@@ -327,5 +327,5 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 110 "execute.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/sql-oldexec.c b/src/interfaces/ecpg/test/expected/sql-oldexec.c
index 5b74dda9b58..d6a661e3fb5 100644
--- a/src/interfaces/ecpg/test/expected/sql-oldexec.c
+++ b/src/interfaces/ecpg/test/expected/sql-oldexec.c
@@ -247,5 +247,5 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 87 "oldexec.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.c b/src/interfaces/ecpg/test/expected/sql-sqlda.c
index 15c81c6b126..ffaf52ca5c6 100644
--- a/src/interfaces/ecpg/test/expected/sql-sqlda.c
+++ b/src/interfaces/ecpg/test/expected/sql-sqlda.c
@@ -527,5 +527,5 @@ if (sqlca.sqlcode < 0) exit (1);}
#line 247 "sqlda.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/sql-twophase.c b/src/interfaces/ecpg/test/expected/sql-twophase.c
index cf491fc078c..20b54d35e56 100644
--- a/src/interfaces/ecpg/test/expected/sql-twophase.c
+++ b/src/interfaces/ecpg/test/expected/sql-twophase.c
@@ -110,5 +110,5 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 41 "twophase.pgc"
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/expected/thread-thread.c b/src/interfaces/ecpg/test/expected/thread-thread.c
index 6e809d60fbc..420bbf194a8 100644
--- a/src/interfaces/ecpg/test/expected/thread-thread.c
+++ b/src/interfaces/ecpg/test/expected/thread-thread.c
@@ -91,7 +91,7 @@ int main()
if( threads == NULL )
{
fprintf(stderr, "Cannot alloc memory\n");
- return( 1 );
+ return 1;
}
for( n = 0; n < nthreads; n++ )
{
@@ -133,7 +133,7 @@ int main()
else
printf("ERROR: Failure - expecting %d rows, got %d.\n", nthreads * iterations, l_rows);
- return( 0 );
+ return 0;
}
void *test_thread(void *arg)
@@ -177,7 +177,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
if( sqlca.sqlcode != 0 )
{
printf("%s: ERROR: cannot connect to database!\n", l_connection);
- return( NULL );
+ return NULL;
}
{ ECPGtrans(__LINE__, l_connection, "begin");
#line 126 "thread.pgc"
@@ -216,6 +216,6 @@ if (sqlca.sqlcode < 0) sqlprint();}
if (sqlca.sqlcode < 0) sqlprint();}
#line 138 "thread.pgc"
- return( NULL );
+ return NULL;
}
#endif /* ENABLE_THREAD_SAFETY */
diff --git a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
index b42c5566338..4bddca9fb98 100644
--- a/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
+++ b/src/interfaces/ecpg/test/expected/thread-thread_implicit.c
@@ -92,7 +92,7 @@ int main()
if( threads == NULL )
{
fprintf(stderr, "Cannot alloc memory\n");
- return( 1 );
+ return 1;
}
for( n = 0; n < nthreads; n++ )
{
@@ -134,7 +134,7 @@ int main()
else
printf("ERROR: Failure - expecting %d rows, got %d.\n", nthreads * iterations, l_rows);
- return( 0 );
+ return 0;
}
void *test_thread(void *arg)
@@ -178,7 +178,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
if( sqlca.sqlcode != 0 )
{
printf("%s: ERROR: cannot connect to database!\n", l_connection);
- return( NULL );
+ return NULL;
}
{ ECPGtrans(__LINE__, NULL, "begin");
#line 127 "thread_implicit.pgc"
@@ -217,6 +217,6 @@ if (sqlca.sqlcode < 0) sqlprint();}
if (sqlca.sqlcode < 0) sqlprint();}
#line 139 "thread_implicit.pgc"
- return( NULL );
+ return NULL;
}
#endif /* ENABLE_THREAD_SAFETY */
diff --git a/src/interfaces/ecpg/test/performance/perftest.pgc b/src/interfaces/ecpg/test/performance/perftest.pgc
index 3ed2ba0f5ed..c8a99349866 100644
--- a/src/interfaces/ecpg/test/performance/perftest.pgc
+++ b/src/interfaces/ecpg/test/performance/perftest.pgc
@@ -140,5 +140,5 @@ exec sql end declare section;
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc b/src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc
index 768cbd5e6f1..5e0d86847dd 100644
--- a/src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc
+++ b/src/interfaces/ecpg/test/pgtypeslib/dt_test.pgc
@@ -365,5 +365,5 @@ main(void)
exec sql rollback;
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc b/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc
index d519305e188..9e1f432823f 100644
--- a/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc
+++ b/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc
@@ -147,5 +147,5 @@ main(void)
PGTYPESinterval_free(i1);
}
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc b/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc
index 3b5781632e8..bc682b93d56 100644
--- a/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc
+++ b/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc
@@ -90,5 +90,5 @@ main(void)
exec sql rollback;
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/num_test.pgc b/src/interfaces/ecpg/test/pgtypeslib/num_test.pgc
index a024c8702fb..d276f70772b 100644
--- a/src/interfaces/ecpg/test/pgtypeslib/num_test.pgc
+++ b/src/interfaces/ecpg/test/pgtypeslib/num_test.pgc
@@ -93,5 +93,5 @@ main(void)
exec sql rollback;
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc b/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc
index 2ac666f7c02..16ca6a44a5e 100644
--- a/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc
+++ b/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc
@@ -210,7 +210,7 @@ main(void)
}
free(numarr);
- return (0);
+ return 0;
}
static void
diff --git a/src/interfaces/ecpg/test/preproc/array_of_struct.pgc b/src/interfaces/ecpg/test/preproc/array_of_struct.pgc
index f9e1946b3f1..69f57584742 100644
--- a/src/interfaces/ecpg/test/preproc/array_of_struct.pgc
+++ b/src/interfaces/ecpg/test/preproc/array_of_struct.pgc
@@ -91,5 +91,5 @@ int main()
EXEC SQL disconnect all;
- return( 0 );
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/preproc/cursor.pgc b/src/interfaces/ecpg/test/preproc/cursor.pgc
index 42479129897..8a286ad523a 100644
--- a/src/interfaces/ecpg/test/preproc/cursor.pgc
+++ b/src/interfaces/ecpg/test/preproc/cursor.pgc
@@ -252,5 +252,5 @@ exec sql end declare section;
strcpy(msg, "disconnect");
exec sql disconnect all;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/preproc/define.pgc b/src/interfaces/ecpg/test/preproc/define.pgc
index 2161733f497..0d07ebfe636 100644
--- a/src/interfaces/ecpg/test/preproc/define.pgc
+++ b/src/interfaces/ecpg/test/preproc/define.pgc
@@ -58,5 +58,5 @@ exec sql end declare section;
exec sql commit;
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/preproc/outofscope.pgc b/src/interfaces/ecpg/test/preproc/outofscope.pgc
index 6b5d2707cef..aae53250a54 100644
--- a/src/interfaces/ecpg/test/preproc/outofscope.pgc
+++ b/src/interfaces/ecpg/test/preproc/outofscope.pgc
@@ -123,5 +123,5 @@ main (void)
strcpy(msg, "disconnect");
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/preproc/pointer_to_struct.pgc b/src/interfaces/ecpg/test/preproc/pointer_to_struct.pgc
index ec94273408b..1ec651e3fc3 100644
--- a/src/interfaces/ecpg/test/preproc/pointer_to_struct.pgc
+++ b/src/interfaces/ecpg/test/preproc/pointer_to_struct.pgc
@@ -96,5 +96,5 @@ int main()
EXEC SQL disconnect all;
/* All the memory will anyway be freed at the end */
- return( 0 );
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/preproc/strings.pgc b/src/interfaces/ecpg/test/preproc/strings.pgc
index d6ec9a4cb81..f004ddf6dc1 100644
--- a/src/interfaces/ecpg/test/preproc/strings.pgc
+++ b/src/interfaces/ecpg/test/preproc/strings.pgc
@@ -23,5 +23,5 @@ int main(void)
printf("%s %s %s %s %s %s\n", s1, s2, s3, s4, s5, s6);
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/preproc/variable.pgc b/src/interfaces/ecpg/test/preproc/variable.pgc
index 05420afdb2c..697a7dc8143 100644
--- a/src/interfaces/ecpg/test/preproc/variable.pgc
+++ b/src/interfaces/ecpg/test/preproc/variable.pgc
@@ -97,5 +97,5 @@ exec sql end declare section;
strcpy(msg, "disconnect");
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/sql/array.pgc b/src/interfaces/ecpg/test/sql/array.pgc
index 5f12c472c96..15c9cfa5f72 100644
--- a/src/interfaces/ecpg/test/sql/array.pgc
+++ b/src/interfaces/ecpg/test/sql/array.pgc
@@ -107,5 +107,5 @@ EXEC SQL END DECLARE SECTION;
free(t);
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/sql/describe.pgc b/src/interfaces/ecpg/test/sql/describe.pgc
index b95ab351bd0..87d6bd9a29c 100644
--- a/src/interfaces/ecpg/test/sql/describe.pgc
+++ b/src/interfaces/ecpg/test/sql/describe.pgc
@@ -195,5 +195,5 @@ exec sql end declare section;
strcpy(msg, "disconnect");
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/sql/execute.pgc b/src/interfaces/ecpg/test/sql/execute.pgc
index b8364c78bba..cc9814e9bea 100644
--- a/src/interfaces/ecpg/test/sql/execute.pgc
+++ b/src/interfaces/ecpg/test/sql/execute.pgc
@@ -109,5 +109,5 @@ exec sql end declare section;
exec sql commit;
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/sql/oldexec.pgc b/src/interfaces/ecpg/test/sql/oldexec.pgc
index 2988f2ab8a4..4f94a18aa1b 100644
--- a/src/interfaces/ecpg/test/sql/oldexec.pgc
+++ b/src/interfaces/ecpg/test/sql/oldexec.pgc
@@ -86,5 +86,5 @@ exec sql end declare section;
exec sql commit;
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/sql/sqlda.pgc b/src/interfaces/ecpg/test/sql/sqlda.pgc
index 29774b59090..eaf5c6f7e1c 100644
--- a/src/interfaces/ecpg/test/sql/sqlda.pgc
+++ b/src/interfaces/ecpg/test/sql/sqlda.pgc
@@ -246,5 +246,5 @@ exec sql end declare section;
strcpy(msg, "disconnect");
exec sql disconnect;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/sql/twophase.pgc b/src/interfaces/ecpg/test/sql/twophase.pgc
index 867a28e4c46..38913d7af2d 100644
--- a/src/interfaces/ecpg/test/sql/twophase.pgc
+++ b/src/interfaces/ecpg/test/sql/twophase.pgc
@@ -40,5 +40,5 @@ int main(void)
strcpy(msg, "disconnect");
exec sql disconnect current;
- return (0);
+ return 0;
}
diff --git a/src/interfaces/ecpg/test/thread/thread.pgc b/src/interfaces/ecpg/test/thread/thread.pgc
index c5fbe928d9f..ae6b229962b 100644
--- a/src/interfaces/ecpg/test/thread/thread.pgc
+++ b/src/interfaces/ecpg/test/thread/thread.pgc
@@ -60,7 +60,7 @@ int main()
if( threads == NULL )
{
fprintf(stderr, "Cannot alloc memory\n");
- return( 1 );
+ return 1;
}
for( n = 0; n < nthreads; n++ )
{
@@ -92,7 +92,7 @@ int main()
else
printf("ERROR: Failure - expecting %d rows, got %d.\n", nthreads * iterations, l_rows);
- return( 0 );
+ return 0;
}
void *test_thread(void *arg)
@@ -121,7 +121,7 @@ void *test_thread(void *arg)
if( sqlca.sqlcode != 0 )
{
printf("%s: ERROR: cannot connect to database!\n", l_connection);
- return( NULL );
+ return NULL;
}
EXEC SQL AT :l_connection BEGIN;
@@ -136,6 +136,6 @@ void *test_thread(void *arg)
/* all done */
EXEC SQL AT :l_connection COMMIT;
EXEC SQL DISCONNECT :l_connection;
- return( NULL );
+ return NULL;
}
#endif /* ENABLE_THREAD_SAFETY */
diff --git a/src/interfaces/ecpg/test/thread/thread_implicit.pgc b/src/interfaces/ecpg/test/thread/thread_implicit.pgc
index d65f17c0736..0dfcb7172bc 100644
--- a/src/interfaces/ecpg/test/thread/thread_implicit.pgc
+++ b/src/interfaces/ecpg/test/thread/thread_implicit.pgc
@@ -61,7 +61,7 @@ int main()
if( threads == NULL )
{
fprintf(stderr, "Cannot alloc memory\n");
- return( 1 );
+ return 1;
}
for( n = 0; n < nthreads; n++ )
{
@@ -93,7 +93,7 @@ int main()
else
printf("ERROR: Failure - expecting %d rows, got %d.\n", nthreads * iterations, l_rows);
- return( 0 );
+ return 0;
}
void *test_thread(void *arg)
@@ -122,7 +122,7 @@ void *test_thread(void *arg)
if( sqlca.sqlcode != 0 )
{
printf("%s: ERROR: cannot connect to database!\n", l_connection);
- return( NULL );
+ return NULL;
}
EXEC SQL BEGIN;
@@ -137,6 +137,6 @@ void *test_thread(void *arg)
/* all done */
EXEC SQL COMMIT;
EXEC SQL DISCONNECT :l_connection;
- return( NULL );
+ return NULL;
}
#endif /* ENABLE_THREAD_SAFETY */
diff --git a/src/test/isolation/specscanner.l b/src/test/isolation/specscanner.l
index aed9269c63b..a9528bda6bb 100644
--- a/src/test/isolation/specscanner.l
+++ b/src/test/isolation/specscanner.l
@@ -39,11 +39,11 @@ comment ("#"{non_newline}*)
%%
-permutation { return(PERMUTATION); }
-session { return(SESSION); }
-setup { return(SETUP); }
-step { return(STEP); }
-teardown { return(TEARDOWN); }
+permutation { return PERMUTATION; }
+session { return SESSION; }
+setup { return SETUP; }
+step { return STEP; }
+teardown { return TEARDOWN; }
[\n] { yyline++; }
{comment} { /* ignore */ }