summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/prepare.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-08-17 12:39:20 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-09-05 14:52:55 -0400
commit17273d059cd3a5cba818505b0d47a444c36a3513 (patch)
tree812c47b95d279e50e5d797852edd6664f217a0c8 /src/interfaces/ecpg/ecpglib/prepare.c
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 <michael.paquier@gmail.com> Reviewed-by: Ryan Murphy <ryanfmurphy@gmail.com>
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/prepare.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/prepare.c22
1 files changed, 11 insertions, 11 deletions
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;
}