mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user