mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Initial pgindent run with pg_bsd_indent version 2.0.
The new indent version includes numerous fixes thanks to Piotr Stefaniak. The main changes visible in this commit are: * Nicer formatting of function-pointer declarations. * No longer unexpectedly removes spaces in expressions using casts, sizeof, or offsetof. * No longer wants to add a space in "struct structname *varname", as well as some similar cases for const- or volatile-qualified pointers. * Declarations using PG_USED_FOR_ASSERTS_ONLY are formatted more nicely. * Fixes bug where comments following declarations were sometimes placed with no space separating them from the code. * Fixes some odd decisions for comments following case labels. * Fixes some cases where comments following code were indented to less than the expected column 33. On the less good side, it now tends to put more whitespace around typedef names that are not listed in typedefs.list. This might encourage us to put more effort into typedef name collection; it's not really a bug in indent itself. There are more changes coming after this round, having to do with comment indentation and alignment of lines appearing within parentheses. I wanted to limit the size of the diffs to something that could be reviewed without one's eyes completely glazing over, so it seemed better to split up the changes as much as practical. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
This commit is contained in:
@ -349,8 +349,8 @@ static int uri_prefix_length(const char *connstr);
|
||||
static bool recognized_connection_string(const char *connstr);
|
||||
static PQconninfoOption *conninfo_parse(const char *conninfo,
|
||||
PQExpBuffer errorMessage, bool use_defaults);
|
||||
static PQconninfoOption *conninfo_array_parse(const char *const * keywords,
|
||||
const char *const * values, PQExpBuffer errorMessage,
|
||||
static PQconninfoOption *conninfo_array_parse(const char *const *keywords,
|
||||
const char *const *values, PQExpBuffer errorMessage,
|
||||
bool use_defaults, int expand_dbname);
|
||||
static bool conninfo_add_defaults(PQconninfoOption *options,
|
||||
PQExpBuffer errorMessage);
|
||||
@ -507,8 +507,8 @@ pqDropConnection(PGconn *conn, bool flushInput)
|
||||
* call succeeded.
|
||||
*/
|
||||
PGconn *
|
||||
PQconnectdbParams(const char *const * keywords,
|
||||
const char *const * values,
|
||||
PQconnectdbParams(const char *const *keywords,
|
||||
const char *const *values,
|
||||
int expand_dbname)
|
||||
{
|
||||
PGconn *conn = PQconnectStartParams(keywords, values, expand_dbname);
|
||||
@ -526,8 +526,8 @@ PQconnectdbParams(const char *const * keywords,
|
||||
* check server status, accepting parameters identical to PQconnectdbParams
|
||||
*/
|
||||
PGPing
|
||||
PQpingParams(const char *const * keywords,
|
||||
const char *const * values,
|
||||
PQpingParams(const char *const *keywords,
|
||||
const char *const *values,
|
||||
int expand_dbname)
|
||||
{
|
||||
PGconn *conn = PQconnectStartParams(keywords, values, expand_dbname);
|
||||
@ -610,8 +610,8 @@ PQping(const char *conninfo)
|
||||
* See PQconnectPoll for more info.
|
||||
*/
|
||||
PGconn *
|
||||
PQconnectStartParams(const char *const * keywords,
|
||||
const char *const * values,
|
||||
PQconnectStartParams(const char *const *keywords,
|
||||
const char *const *values,
|
||||
int expand_dbname)
|
||||
{
|
||||
PGconn *conn;
|
||||
@ -2280,7 +2280,7 @@ keep_going: /* We will come back to here until there is
|
||||
/* Fill in the client address */
|
||||
conn->laddr.salen = sizeof(conn->laddr.addr);
|
||||
if (getsockname(conn->sock,
|
||||
(struct sockaddr *) & conn->laddr.addr,
|
||||
(struct sockaddr *) &conn->laddr.addr,
|
||||
&conn->laddr.salen) < 0)
|
||||
{
|
||||
appendPQExpBuffer(&conn->errorMessage,
|
||||
@ -3740,7 +3740,7 @@ internal_cancel(SockAddr *raddr, int be_pid, int be_key,
|
||||
goto cancel_errReturn;
|
||||
}
|
||||
retry3:
|
||||
if (connect(tmpsock, (struct sockaddr *) & raddr->addr,
|
||||
if (connect(tmpsock, (struct sockaddr *) &raddr->addr,
|
||||
raddr->salen) < 0)
|
||||
{
|
||||
if (SOCK_ERRNO == EINTR)
|
||||
@ -4926,7 +4926,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage,
|
||||
* a database, in-tree code first wraps the name in a connection string.
|
||||
*/
|
||||
static PQconninfoOption *
|
||||
conninfo_array_parse(const char *const * keywords, const char *const * values,
|
||||
conninfo_array_parse(const char *const *keywords, const char *const *values,
|
||||
PQExpBuffer errorMessage, bool use_defaults,
|
||||
int expand_dbname)
|
||||
{
|
||||
|
Reference in New Issue
Block a user