diff options
| author | Tom Lane | 2017-06-21 18:39:04 +0000 |
|---|---|---|
| committer | Tom Lane | 2017-06-21 18:39:04 +0000 |
| commit | e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 (patch) | |
| tree | 8dc7df95c340803546152724fbc17aee4b8527f9 /contrib | |
| parent | 8ff6d4ec7840b0af56f1207073f44b7f2afae96d (diff) | |
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
Diffstat (limited to 'contrib')
31 files changed, 71 insertions, 71 deletions
diff --git a/contrib/bloom/blutils.c b/contrib/bloom/blutils.c index 00a65875b03..f2eda67e0ae 100644 --- a/contrib/bloom/blutils.c +++ b/contrib/bloom/blutils.c @@ -75,7 +75,7 @@ _PG_init(void) bl_relopt_tab[i + 1].optname = MemoryContextStrdup(TopMemoryContext, buf); bl_relopt_tab[i + 1].opttype = RELOPT_TYPE_INT; - bl_relopt_tab[i + 1].offset = offsetof(BloomOptions, bitSize[0]) +sizeof(int) * i; + bl_relopt_tab[i + 1].offset = offsetof(BloomOptions, bitSize[0]) + sizeof(int) * i; } } diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c index 3648adccef7..c531663f927 100644 --- a/contrib/btree_gist/btree_utils_var.c +++ b/contrib/btree_gist/btree_utils_var.c @@ -72,7 +72,7 @@ gbt_var_key_readable(const GBT_VARKEY *k) * Create a leaf-entry to store in the index, from a single Datum. */ static GBT_VARKEY * -gbt_var_key_from_datum(const struct varlena * u) +gbt_var_key_from_datum(const struct varlena *u) { int32 lowersize = VARSIZE(u); GBT_VARKEY *r; diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index a6a3c09ff8e..f2182bc3f4a 100644 --- a/contrib/dblink/dblink.c +++ b/contrib/dblink/dblink.c @@ -179,7 +179,7 @@ dblink_conn_not_avail(const char *conname) static void dblink_get_conn(char *conname_or_str, - PGconn *volatile * conn_p, char **conname_p, volatile bool *freeconn_p) + PGconn *volatile *conn_p, char **conname_p, volatile bool *freeconn_p) { remoteConn *rconn = getConnectionByName(conname_or_str); PGconn *conn; @@ -723,7 +723,7 @@ dblink_record_internal(FunctionCallInfo fcinfo, bool is_async) /* shouldn't happen */ elog(ERROR, "wrong number of arguments"); } - else /* is_async */ + else /* is_async */ { /* get async result */ conname = text_to_cstring(PG_GETARG_TEXT_PP(0)); diff --git a/contrib/fuzzystrmatch/fuzzystrmatch.c b/contrib/fuzzystrmatch/fuzzystrmatch.c index f1bb7bca732..ce58a6a7fc5 100644 --- a/contrib/fuzzystrmatch/fuzzystrmatch.c +++ b/contrib/fuzzystrmatch/fuzzystrmatch.c @@ -389,7 +389,7 @@ _metaphone(char *word, /* IN */ /*-- Allocate memory for our phoned_phrase --*/ if (max_phonemes == 0) { /* Assume largest possible */ - *phoned_word = palloc(sizeof(char) * strlen(word) +1); + *phoned_word = palloc(sizeof(char) * strlen(word) + 1); } else { @@ -722,7 +722,7 @@ _metaphone(char *word, /* IN */ End_Phoned_Word; return (META_SUCCESS); -} /* END metaphone */ +} /* END metaphone */ /* diff --git a/contrib/intarray/_int_gin.c b/contrib/intarray/_int_gin.c index fb16b66edb0..73628bea11d 100644 --- a/contrib/intarray/_int_gin.c +++ b/contrib/intarray/_int_gin.c @@ -93,7 +93,7 @@ ginint4_queryextract(PG_FUNCTION_ARGS) case RTOldContainsStrategyNumber: if (*nentries > 0) *searchMode = GIN_SEARCH_MODE_DEFAULT; - else /* everything contains the empty set */ + else /* everything contains the empty set */ *searchMode = GIN_SEARCH_MODE_ALL; break; default: diff --git a/contrib/ltree/lquery_op.c b/contrib/ltree/lquery_op.c index 31d150db40f..3bf5818e3a1 100644 --- a/contrib/ltree/lquery_op.c +++ b/contrib/ltree/lquery_op.c @@ -147,7 +147,7 @@ static struct { bool muse; uint32 high_pos; -} SomeStack = +} SomeStack = { false, 0, diff --git a/contrib/oid2name/oid2name.c b/contrib/oid2name/oid2name.c index aab71aed2fa..ffb8234c0d7 100644 --- a/contrib/oid2name/oid2name.c +++ b/contrib/oid2name/oid2name.c @@ -57,7 +57,7 @@ void sql_exec_dumpalltbspc(PGconn *, struct options *); /* function to parse command line options and check for some usage errors. */ void -get_opts(int argc, char **argv, struct options * my_opts) +get_opts(int argc, char **argv, struct options *my_opts) { int c; const char *progname; @@ -260,7 +260,7 @@ get_comma_elts(eary *eary) /* establish connection with database. */ PGconn * -sql_conn(struct options * my_opts) +sql_conn(struct options *my_opts) { PGconn *conn; bool have_password = false; @@ -411,7 +411,7 @@ sql_exec(PGconn *conn, const char *todo, bool quiet) * Dump all databases. There are no system objects to worry about. */ void -sql_exec_dumpalldbs(PGconn *conn, struct options * opts) +sql_exec_dumpalldbs(PGconn *conn, struct options *opts) { char todo[1024]; @@ -428,7 +428,7 @@ sql_exec_dumpalldbs(PGconn *conn, struct options * opts) * Dump all tables, indexes and sequences in the current database. */ void -sql_exec_dumpalltables(PGconn *conn, struct options * opts) +sql_exec_dumpalltables(PGconn *conn, struct options *opts) { char todo[1024]; char *addfields = ",c.oid AS \"Oid\", nspname AS \"Schema\", spcname as \"Tablespace\" "; @@ -460,7 +460,7 @@ sql_exec_dumpalltables(PGconn *conn, struct options * opts) * given objects in the current database. */ void -sql_exec_searchtables(PGconn *conn, struct options * opts) +sql_exec_searchtables(PGconn *conn, struct options *opts) { char *todo; char *qualifiers, @@ -516,7 +516,7 @@ sql_exec_searchtables(PGconn *conn, struct options * opts) CppAsString2(RELKIND_SEQUENCE) "," CppAsString2(RELKIND_TOASTVALUE) ") AND\n" " t.oid = CASE\n" - " WHEN reltablespace <> 0 THEN reltablespace\n" + " WHEN reltablespace <> 0 THEN reltablespace\n" " ELSE dattablespace\n" " END AND\n" " (%s)\n" @@ -530,7 +530,7 @@ sql_exec_searchtables(PGconn *conn, struct options * opts) } void -sql_exec_dumpalltbspc(PGconn *conn, struct options * opts) +sql_exec_dumpalltbspc(PGconn *conn, struct options *opts) { char todo[1024]; diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index bf03e67513f..1febdca16fe 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -250,7 +250,7 @@ typedef enum PGSS_TRACK_NONE, /* track no statements */ PGSS_TRACK_TOP, /* only top level statements */ PGSS_TRACK_ALL /* all statements, including nested ones */ -} PGSSTrackLevel; +} PGSSTrackLevel; static const struct config_enum_entry track_options[] = { diff --git a/contrib/pg_trgm/trgm_op.c b/contrib/pg_trgm/trgm_op.c index e9a713113ed..f7e96acc53c 100644 --- a/contrib/pg_trgm/trgm_op.c +++ b/contrib/pg_trgm/trgm_op.c @@ -325,7 +325,7 @@ generate_trgm(char *str, int slen) protect_out_of_mem(slen); - trg = (TRGM *) palloc(TRGMHDRSIZE + sizeof(trgm) * (slen / 2 + 1) *3); + trg = (TRGM *) palloc(TRGMHDRSIZE + sizeof(trgm) * (slen / 2 + 1) * 3); trg->flag = ARRKEY; len = generate_trgm_only(GETARR(trg), str, slen); @@ -572,8 +572,8 @@ calc_word_similarity(char *str1, int slen1, char *str2, int slen2, protect_out_of_mem(slen1 + slen2); /* Make positional trigrams */ - trg1 = (trgm *) palloc(sizeof(trgm) * (slen1 / 2 + 1) *3); - trg2 = (trgm *) palloc(sizeof(trgm) * (slen2 / 2 + 1) *3); + trg1 = (trgm *) palloc(sizeof(trgm) * (slen1 / 2 + 1) * 3); + trg2 = (trgm *) palloc(sizeof(trgm) * (slen2 / 2 + 1) * 3); len1 = generate_trgm_only(trg1, str1, slen1); len2 = generate_trgm_only(trg2, str2, slen2); @@ -806,7 +806,7 @@ generate_wildcard_trgm(const char *str, int slen) protect_out_of_mem(slen); - trg = (TRGM *) palloc(TRGMHDRSIZE + sizeof(trgm) * (slen / 2 + 1) *3); + trg = (TRGM *) palloc(TRGMHDRSIZE + sizeof(trgm) * (slen / 2 + 1) * 3); trg->flag = ARRKEY; SET_VARSIZE(trg, TRGMHDRSIZE); diff --git a/contrib/pg_visibility/pg_visibility.c b/contrib/pg_visibility/pg_visibility.c index 480f917d087..ce4a2cb12f2 100644 --- a/contrib/pg_visibility/pg_visibility.c +++ b/contrib/pg_visibility/pg_visibility.c @@ -481,7 +481,7 @@ collect_visibility_data(Oid relid, bool include_pd) check_relation_relkind(rel); nblocks = RelationGetNumberOfBlocks(rel); - info = palloc0(offsetof(vbits, bits) +nblocks); + info = palloc0(offsetof(vbits, bits) + nblocks); info->next = 0; info->count = nblocks; diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c index 61a01e2b710..41021a7ffdb 100644 --- a/contrib/pgcrypto/imath.c +++ b/contrib/pgcrypto/imath.c @@ -908,7 +908,7 @@ mp_int_sqr(mp_int a, mp_int c) CHECK(a != NULL && c != NULL); /* Get a temporary buffer big enough to hold the result */ - osize = (mp_size) 4 *((MP_USED(a) + 1) / 2); + osize = (mp_size) 4 * ((MP_USED(a) + 1) / 2); if (a == c) { @@ -1613,8 +1613,8 @@ mp_int_gcd(mp_int a, mp_int b, mp_int c) CLEANUP: mp_int_clear(&v); -V: mp_int_clear(&u); -U: mp_int_clear(&t); +V: mp_int_clear(&u); +U: mp_int_clear(&t); return res; } @@ -3512,7 +3512,7 @@ s_outlen(mp_int z, mp_size r) double raw; bits = mp_int_count_bits(z); - raw = (double) bits *s_log2[r]; + raw = (double) bits * s_log2[r]; return (int) (raw + 0.999999); } diff --git a/contrib/pgcrypto/imath.h b/contrib/pgcrypto/imath.h index 0a4f0f713f4..8ba38d3acb9 100644 --- a/contrib/pgcrypto/imath.h +++ b/contrib/pgcrypto/imath.h @@ -61,6 +61,7 @@ typedef struct mpz mp_size used; mp_sign sign; } mpz_t , + *mp_int; #define MP_DIGITS(Z) ((Z)->digits) @@ -117,9 +118,9 @@ mp_result mp_int_mul_value(mp_int a, int value, mp_int c); mp_result mp_int_mul_pow2(mp_int a, int p2, mp_int c); mp_result mp_int_sqr(mp_int a, mp_int c); /* c = a * a */ -mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */ +mp_result mp_int_div(mp_int a, mp_int b, /* q = a / b */ mp_int q, mp_int r); /* r = a % b */ -mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */ +mp_result mp_int_div_value(mp_int a, int value, /* q = a / value */ mp_int q, int *r); /* r = a % value */ mp_result mp_int_div_pow2(mp_int a, int p2, /* q = a / 2^p2 */ mp_int q, mp_int r); /* r = q % 2^p2 */ diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c index 2516092ba4e..c2687cfdb2e 100644 --- a/contrib/pgcrypto/internal.c +++ b/contrib/pgcrypto/internal.c @@ -318,7 +318,7 @@ rj_init(PX_Cipher *c, const uint8 *key, unsigned klen, const uint8 *iv) } static int -rj_real_init(struct int_ctx * cx, int dir) +rj_real_init(struct int_ctx *cx, int dir) { aes_set_key(&cx->ctx.rj, cx->keybuf, cx->keylen * 8, dir); return 0; diff --git a/contrib/pgcrypto/mbuf.h b/contrib/pgcrypto/mbuf.h index 988293a7299..d413eb52764 100644 --- a/contrib/pgcrypto/mbuf.h +++ b/contrib/pgcrypto/mbuf.h @@ -51,7 +51,7 @@ struct PushFilterOps * copied (in-place) returns 0 on error */ int (*push) (PushFilter *next, void *priv, - const uint8 *src, int len); + const uint8 *src, int len); int (*flush) (PushFilter *next, void *priv); void (*free) (void *priv); }; @@ -69,7 +69,7 @@ struct PullFilterOps * use buf as work area if NULL in-place copy */ int (*pull) (void *priv, PullFilter *src, int len, - uint8 **data_p, uint8 *buf, int buflen); + uint8 **data_p, uint8 *buf, int buflen); void (*free) (void *priv); }; diff --git a/contrib/pgcrypto/pgp-decrypt.c b/contrib/pgcrypto/pgp-decrypt.c index 9ea60c4c47d..7d31e5354b8 100644 --- a/contrib/pgcrypto/pgp-decrypt.c +++ b/contrib/pgcrypto/pgp-decrypt.c @@ -460,7 +460,7 @@ mdcbuf_init(void **priv_p, void *arg, PullFilter *src) } static int -mdcbuf_finish(struct MDCBufData * st) +mdcbuf_finish(struct MDCBufData *st) { uint8 hash[20]; int res; @@ -485,7 +485,7 @@ mdcbuf_finish(struct MDCBufData * st) } static void -mdcbuf_load_data(struct MDCBufData * st, uint8 *src, int len) +mdcbuf_load_data(struct MDCBufData *st, uint8 *src, int len) { uint8 *dst = st->pos + st->avail; @@ -495,14 +495,14 @@ mdcbuf_load_data(struct MDCBufData * st, uint8 *src, int len) } static void -mdcbuf_load_mdc(struct MDCBufData * st, uint8 *src, int len) +mdcbuf_load_mdc(struct MDCBufData *st, uint8 *src, int len) { memmove(st->mdc_buf + st->mdc_avail, src, len); st->mdc_avail += len; } static int -mdcbuf_refill(struct MDCBufData * st, PullFilter *src) +mdcbuf_refill(struct MDCBufData *st, PullFilter *src) { uint8 *data; int res; diff --git a/contrib/pgcrypto/pgp-pgsql.c b/contrib/pgcrypto/pgp-pgsql.c index cc5df14725e..058b07f0461 100644 --- a/contrib/pgcrypto/pgp-pgsql.c +++ b/contrib/pgcrypto/pgp-pgsql.c @@ -132,7 +132,7 @@ struct debug_expect }; static void -fill_expect(struct debug_expect * ex, int text_mode) +fill_expect(struct debug_expect *ex, int text_mode) { ex->debug = 0; ex->expect = 0; @@ -157,7 +157,7 @@ fill_expect(struct debug_expect * ex, int text_mode) } while (0) static void -check_expect(PGP_Context *ctx, struct debug_expect * ex) +check_expect(PGP_Context *ctx, struct debug_expect *ex) { EX_CHECK(cipher_algo); EX_CHECK(s2k_mode); @@ -179,7 +179,7 @@ show_debug(const char *msg) static int set_arg(PGP_Context *ctx, char *key, char *val, - struct debug_expect * ex) + struct debug_expect *ex) { int res = 0; @@ -317,7 +317,7 @@ downcase_convert(const uint8 *s, int len) static int parse_args(PGP_Context *ctx, uint8 *args, int arg_len, - struct debug_expect * ex) + struct debug_expect *ex) { char *str = downcase_convert(args, arg_len); char *key, @@ -362,7 +362,7 @@ create_mbuf_from_vardata(text *data) static void init_work(PGP_Context **ctx_p, int is_text, - text *args, struct debug_expect * ex) + text *args, struct debug_expect *ex) { int err = pgp_init(ctx_p); diff --git a/contrib/pgcrypto/px-crypt.c b/contrib/pgcrypto/px-crypt.c index 6c72c4ae830..ee40788fe71 100644 --- a/contrib/pgcrypto/px-crypt.c +++ b/contrib/pgcrypto/px-crypt.c @@ -74,7 +74,7 @@ struct px_crypt_algo char *id; unsigned id_len; char *(*crypt) (const char *psw, const char *salt, - char *buf, unsigned len); + char *buf, unsigned len); }; static const struct px_crypt_algo @@ -115,7 +115,7 @@ struct generator { char *name; char *(*gen) (unsigned long count, const char *input, int size, - char *output, int output_size); + char *output, int output_size); int input_len; int def_rounds; int min_rounds; diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h index e68a95a0584..e8068317d0b 100644 --- a/contrib/pgcrypto/px.h +++ b/contrib/pgcrypto/px.h @@ -169,11 +169,11 @@ struct px_cipher struct px_combo { int (*init) (PX_Combo *cx, const uint8 *key, unsigned klen, - const uint8 *iv, unsigned ivlen); + const uint8 *iv, unsigned ivlen); int (*encrypt) (PX_Combo *cx, const uint8 *data, unsigned dlen, - uint8 *res, unsigned *rlen); + uint8 *res, unsigned *rlen); int (*decrypt) (PX_Combo *cx, const uint8 *data, unsigned dlen, - uint8 *res, unsigned *rlen); + uint8 *res, unsigned *rlen); unsigned (*encrypt_len) (PX_Combo *cx, unsigned dlen); unsigned (*decrypt_len) (PX_Combo *cx, unsigned dlen); void (*free) (PX_Combo *cx); diff --git a/contrib/pgcrypto/rijndael.h b/contrib/pgcrypto/rijndael.h index e536c61a6fb..108ef68b760 100644 --- a/contrib/pgcrypto/rijndael.h +++ b/contrib/pgcrypto/rijndael.h @@ -44,8 +44,7 @@ typedef struct _rijndael_ctx /* These are all based on 32 bit unsigned values and will therefore */ /* require endian conversions for big-endian architectures */ -rijndael_ctx * - rijndael_set_key(rijndael_ctx *, const u4byte *, const u4byte, int); +rijndael_ctx *rijndael_set_key(rijndael_ctx *, const u4byte *, const u4byte, int); void rijndael_encrypt(rijndael_ctx *, const u4byte *, u4byte *); void rijndael_decrypt(rijndael_ctx *, const u4byte *, u4byte *); diff --git a/contrib/pgcrypto/sha1.c b/contrib/pgcrypto/sha1.c index 0e753ce63a1..fb6a57d917c 100644 --- a/contrib/pgcrypto/sha1.c +++ b/contrib/pgcrypto/sha1.c @@ -81,7 +81,7 @@ do { \ static void sha1_step(struct sha1_ctxt *); static void -sha1_step(struct sha1_ctxt * ctxt) +sha1_step(struct sha1_ctxt *ctxt) { uint32 a, b, @@ -226,7 +226,7 @@ sha1_step(struct sha1_ctxt * ctxt) /*------------------------------------------------------------*/ void -sha1_init(struct sha1_ctxt * ctxt) +sha1_init(struct sha1_ctxt *ctxt) { memset(ctxt, 0, sizeof(struct sha1_ctxt)); H(0) = 0x67452301; @@ -237,7 +237,7 @@ sha1_init(struct sha1_ctxt * ctxt) } void -sha1_pad(struct sha1_ctxt * ctxt) +sha1_pad(struct sha1_ctxt *ctxt) { size_t padlen; /* pad length in bytes */ size_t padstart; @@ -280,7 +280,7 @@ sha1_pad(struct sha1_ctxt * ctxt) } void -sha1_loop(struct sha1_ctxt * ctxt, const uint8 *input0, size_t len) +sha1_loop(struct sha1_ctxt *ctxt, const uint8 *input0, size_t len) { const uint8 *input; size_t gaplen; @@ -308,7 +308,7 @@ sha1_loop(struct sha1_ctxt * ctxt, const uint8 *input0, size_t len) } void -sha1_result(struct sha1_ctxt * ctxt, uint8 *digest0) +sha1_result(struct sha1_ctxt *ctxt, uint8 *digest0) { uint8 *digest; diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c index 9facf651378..c801988cc58 100644 --- a/contrib/pgstattuple/pgstatapprox.c +++ b/contrib/pgstattuple/pgstatapprox.c @@ -182,7 +182,7 @@ statapprox_heap(Relation rel, output_type *stat) UnlockReleaseBuffer(buf); } - stat->table_len = (uint64) nblocks *BLCKSZ; + stat->table_len = (uint64) nblocks * BLCKSZ; stat->tuple_count = vac_estimate_reltuples(rel, false, nblocks, scanned, stat->tuple_count + misc_count); diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c index eb02ec5b890..7a91cc3468f 100644 --- a/contrib/pgstattuple/pgstattuple.c +++ b/contrib/pgstattuple/pgstattuple.c @@ -62,7 +62,7 @@ typedef struct pgstattuple_type } pgstattuple_type; typedef void (*pgstat_page) (pgstattuple_type *, Relation, BlockNumber, - BufferAccessStrategy); + BufferAccessStrategy); static Datum build_pgstattuple_type(pgstattuple_type *stat, FunctionCallInfo fcinfo); @@ -386,7 +386,7 @@ pgstat_heap(Relation rel, FunctionCallInfo fcinfo) heap_endscan(scan); relation_close(rel, AccessShareLock); - stat.table_len = (uint64) nblocks *BLCKSZ; + stat.table_len = (uint64) nblocks * BLCKSZ; return build_pgstattuple_type(&stat, fcinfo); } @@ -531,7 +531,7 @@ pgstat_index(Relation rel, BlockNumber start, pgstat_page pagefn, /* Quit if we've scanned the whole relation */ if (blkno >= nblocks) { - stat.table_len = (uint64) nblocks *BLCKSZ; + stat.table_len = (uint64) nblocks * BLCKSZ; break; } diff --git a/contrib/sepgsql/hooks.c b/contrib/sepgsql/hooks.c index c4b978b48f2..6da6a23647a 100644 --- a/contrib/sepgsql/hooks.c +++ b/contrib/sepgsql/hooks.c @@ -52,7 +52,7 @@ typedef struct * command. Elsewhere (including the case of default) NULL. */ const char *createdb_dtemplate; -} sepgsql_context_info_t; +} sepgsql_context_info_t; static sepgsql_context_info_t sepgsql_context_info; diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c index 62398001894..2f01c393ccb 100644 --- a/contrib/sepgsql/label.c +++ b/contrib/sepgsql/label.c @@ -78,7 +78,7 @@ typedef struct { SubTransactionId subid; char *label; -} pending_label; +} pending_label; /* * sepgsql_get_client_label @@ -721,7 +721,7 @@ quote_object_name(const char *src1, const char *src2, * catalog OID. */ static void -exec_object_restorecon(struct selabel_handle * sehnd, Oid catalogId) +exec_object_restorecon(struct selabel_handle *sehnd, Oid catalogId) { Relation rel; SysScanDesc sscan; diff --git a/contrib/sepgsql/selinux.c b/contrib/sepgsql/selinux.c index 7728a183338..bf89e83dd62 100644 --- a/contrib/sepgsql/selinux.c +++ b/contrib/sepgsql/selinux.c @@ -36,7 +36,7 @@ static struct const char *av_name; uint32 av_code; } av[32]; -} selinux_catalog[] = +} selinux_catalog[] = { { @@ -732,7 +732,7 @@ void sepgsql_compute_avd(const char *scontext, const char *tcontext, uint16 tclass, - struct av_decision * avd) + struct av_decision *avd) { const char *tclass_name; security_class_t tclass_ex; diff --git a/contrib/sepgsql/sepgsql.h b/contrib/sepgsql/sepgsql.h index 9d245c27801..fbe25e6602d 100644 --- a/contrib/sepgsql/sepgsql.h +++ b/contrib/sepgsql/sepgsql.h @@ -235,7 +235,7 @@ extern void sepgsql_audit_log(bool denied, extern void sepgsql_compute_avd(const char *scontext, const char *tcontext, uint16 tclass, - struct av_decision * avd); + struct av_decision *avd); extern char *sepgsql_compute_create(const char *scontext, const char *tcontext, diff --git a/contrib/sepgsql/uavc.c b/contrib/sepgsql/uavc.c index 6fd58c7e428..ffb00716c62 100644 --- a/contrib/sepgsql/uavc.c +++ b/contrib/sepgsql/uavc.c @@ -45,7 +45,7 @@ typedef struct /* true, if tcontext is valid */ char *ncontext; /* temporary scontext on execution of trusted * procedure, or NULL elsewhere */ -} avc_cache; +} avc_cache; /* * Declaration of static variables diff --git a/contrib/spi/timetravel.c b/contrib/spi/timetravel.c index 19bf8a892ce..c4b3e7d6fae 100644 --- a/contrib/spi/timetravel.c +++ b/contrib/spi/timetravel.c @@ -461,7 +461,7 @@ set_timetravel(PG_FUNCTION_ARGS) s = rname = DatumGetCString(DirectFunctionCall1(nameout, NameGetDatum(relname))); if (s) { - pp = malloc(offsetof(TTOffList, name) +strlen(rname) + 1); + pp = malloc(offsetof(TTOffList, name) + strlen(rname) + 1); if (pp) { pp->next = NULL; diff --git a/contrib/uuid-ossp/uuid-ossp.c b/contrib/uuid-ossp/uuid-ossp.c index 1ce08555cfb..f34398f54a7 100644 --- a/contrib/uuid-ossp/uuid-ossp.c +++ b/contrib/uuid-ossp/uuid-ossp.c @@ -262,11 +262,11 @@ uuid_generate_internal(int v, unsigned char *ns, char *ptr, int len) switch (v) { - case 0: /* constant-value uuids */ + case 0: /* constant-value uuids */ strlcpy(strbuf, ptr, 37); break; - case 1: /* time/node-based uuids */ + case 1: /* time/node-based uuids */ { #ifdef HAVE_UUID_E2FS uuid_t uu; @@ -316,8 +316,8 @@ uuid_generate_internal(int v, unsigned char *ns, char *ptr, int len) break; } - case 3: /* namespace-based MD5 uuids */ - case 5: /* namespace-based SHA1 uuids */ + case 3: /* namespace-based MD5 uuids */ + case 5: /* namespace-based SHA1 uuids */ { dce_uuid_t uu; #ifdef HAVE_UUID_BSD @@ -373,7 +373,7 @@ uuid_generate_internal(int v, unsigned char *ns, char *ptr, int len) break; } - case 4: /* random uuid */ + case 4: /* random uuid */ default: { #ifdef HAVE_UUID_E2FS diff --git a/contrib/vacuumlo/vacuumlo.c b/contrib/vacuumlo/vacuumlo.c index 887483cf0fa..a4d45533033 100644 --- a/contrib/vacuumlo/vacuumlo.c +++ b/contrib/vacuumlo/vacuumlo.c @@ -47,7 +47,7 @@ struct _param long transaction_limit; }; -static int vacuumlo(const char *database, const struct _param * param); +static int vacuumlo(const char *database, const struct _param *param); static void usage(const char *progname); @@ -56,7 +56,7 @@ static void usage(const char *progname); * This vacuums LOs of one database. It returns 0 on success, -1 on failure. */ static int -vacuumlo(const char *database, const struct _param * param) +vacuumlo(const char *database, const struct _param *param) { PGconn *conn; PGresult *res, diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index 034545caa87..acf1c4a1c11 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -720,7 +720,7 @@ xpath_table(PG_FUNCTION_ARGS) /* Parse the document */ if (xmldoc) doctree = xmlParseMemory(xmldoc, strlen(xmldoc)); - else /* treat NULL as not well-formed */ + else /* treat NULL as not well-formed */ doctree = NULL; if (doctree == NULL) |
