Skip to content

Commit 9af4159

Browse files
committed
pgindent run for release 9.3
This is the first run of the Perl-based pgindent script. Also update pgindent instructions.
1 parent 07ab261 commit 9af4159

File tree

367 files changed

+4216
-3823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

367 files changed

+4216
-3823
lines changed

contrib/btree_gist/btree_bit.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ gbt_bit_xfrm(bytea *leaf)
9797
static GBT_VARKEY *
9898
gbt_bit_l2n(GBT_VARKEY *leaf)
9999
{
100-
101100
GBT_VARKEY *out = leaf;
102101
GBT_VARKEY_R r = gbt_var_key_readable(leaf);
103102
bytea *o;

contrib/btree_gist/btree_text.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ gbt_text_compress(PG_FUNCTION_ARGS)
121121
Datum
122122
gbt_bpchar_compress(PG_FUNCTION_ARGS)
123123
{
124-
125124
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
126125
GISTENTRY *retval;
127126

contrib/btree_gist/btree_ts.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ gbt_ts_union(PG_FUNCTION_ARGS)
382382
Datum
383383
gbt_ts_penalty(PG_FUNCTION_ARGS)
384384
{
385-
386385
tsKEY *origentry = (tsKEY *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(0))->key);
387386
tsKEY *newentry = (tsKEY *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(1))->key);
388387
float *result = (float *) PG_GETARG_POINTER(2);

contrib/btree_gist/btree_utils_num.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ gbt_num_union(GBT_NUMKEY *out, const GistEntryVector *entryvec, const gbtree_nin
137137
bool
138138
gbt_num_same(const GBT_NUMKEY *a, const GBT_NUMKEY *b, const gbtree_ninfo *tinfo)
139139
{
140-
141140
GBT_NUMKEY_R b1,
142141
b2;
143142

@@ -159,7 +158,6 @@ gbt_num_same(const GBT_NUMKEY *a, const GBT_NUMKEY *b, const gbtree_ninfo *tinfo
159158
void
160159
gbt_num_bin_union(Datum *u, GBT_NUMKEY *e, const gbtree_ninfo *tinfo)
161160
{
162-
163161
GBT_NUMKEY_R rd;
164162

165163
rd.lower = &e[0];

contrib/btree_gist/btree_utils_var.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ gbt_var_decompress(PG_FUNCTION_ARGS)
5656
GBT_VARKEY_R
5757
gbt_var_key_readable(const GBT_VARKEY *k)
5858
{
59-
6059
GBT_VARKEY_R r;
6160

6261
r.lower = (bytea *) &(((char *) k)[VARHDRSZ]);
@@ -270,7 +269,6 @@ gbt_var_bin_union(Datum *u, GBT_VARKEY *e, Oid collation,
270269
GISTENTRY *
271270
gbt_var_compress(GISTENTRY *entry, const gbtree_vinfo *tinfo)
272271
{
273-
274272
GISTENTRY *retval;
275273

276274
if (entry->leafkey)
@@ -299,7 +297,6 @@ GBT_VARKEY *
299297
gbt_var_union(const GistEntryVector *entryvec, int32 *size, Oid collation,
300298
const gbtree_vinfo *tinfo)
301299
{
302-
303300
int i = 0,
304301
numranges = entryvec->n;
305302
GBT_VARKEY *cur;

contrib/dblink/dblink.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,7 @@ dblink_fdw_validator(PG_FUNCTION_ARGS)
19731973
ereport(ERROR,
19741974
(errcode(ERRCODE_FDW_OUT_OF_MEMORY),
19751975
errmsg("out of memory"),
1976-
errdetail("could not get libpq's default connection options")));
1976+
errdetail("could not get libpq's default connection options")));
19771977
}
19781978

19791979
/* Validate each supplied option. */
@@ -1984,9 +1984,9 @@ dblink_fdw_validator(PG_FUNCTION_ARGS)
19841984
if (!is_valid_dblink_option(options, def->defname, context))
19851985
{
19861986
/*
1987-
* Unknown option, or invalid option for the context specified,
1988-
* so complain about it. Provide a hint with list of valid
1989-
* options for the context.
1987+
* Unknown option, or invalid option for the context specified, so
1988+
* complain about it. Provide a hint with list of valid options
1989+
* for the context.
19901990
*/
19911991
StringInfoData buf;
19921992
const PQconninfoOption *opt;

contrib/file_fdw/file_fdw.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ static void fileGetOptions(Oid foreigntableid,
140140
char **filename, List **other_options);
141141
static List *get_file_fdw_attribute_options(Oid relid);
142142
static bool check_selective_binary_conversion(RelOptInfo *baserel,
143-
Oid foreigntableid,
144-
List **columns);
143+
Oid foreigntableid,
144+
List **columns);
145145
static void estimate_size(PlannerInfo *root, RelOptInfo *baserel,
146146
FileFdwPlanState *fdw_private);
147147
static void estimate_costs(PlannerInfo *root, RelOptInfo *baserel,
@@ -478,7 +478,7 @@ fileGetForeignPaths(PlannerInfo *root,
478478
&startup_cost, &total_cost);
479479

480480
/*
481-
* Create a ForeignPath node and add it as only possible path. We use the
481+
* Create a ForeignPath node and add it as only possible path. We use the
482482
* fdw_private list of the path to carry the convert_selectively option;
483483
* it will be propagated into the fdw_private list of the Plan node.
484484
*/
@@ -770,7 +770,7 @@ check_selective_binary_conversion(RelOptInfo *baserel,
770770
/* Add all the attributes used by restriction clauses. */
771771
foreach(lc, baserel->baserestrictinfo)
772772
{
773-
RestrictInfo *rinfo = (RestrictInfo *) lfirst(lc);
773+
RestrictInfo *rinfo = (RestrictInfo *) lfirst(lc);
774774

775775
pull_varattnos((Node *) rinfo->clause, baserel->relid,
776776
&attrs_used);

contrib/hstore/hstore_io.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,17 +1300,17 @@ hstore_to_json_loose(PG_FUNCTION_ARGS)
13001300
* digit as numeric - could be a zip code or similar
13011301
*/
13021302
if (src->len > 0 &&
1303-
!(src->data[0] == '0' && isdigit((unsigned char) src->data[1])) &&
1303+
!(src->data[0] == '0' && isdigit((unsigned char) src->data[1])) &&
13041304
strspn(src->data, "+-0123456789Ee.") == src->len)
13051305
{
13061306
/*
13071307
* might be a number. See if we can input it as a numeric
13081308
* value. Ignore any actual parsed value.
13091309
*/
13101310
char *endptr = "junk";
1311-
long lval;
1311+
long lval;
13121312

1313-
lval = strtol(src->data, &endptr, 10);
1313+
lval = strtol(src->data, &endptr, 10);
13141314
(void) lval;
13151315
if (*endptr == '\0')
13161316
{
@@ -1323,7 +1323,7 @@ hstore_to_json_loose(PG_FUNCTION_ARGS)
13231323
else
13241324
{
13251325
/* not an int - try a double */
1326-
double dval;
1326+
double dval;
13271327

13281328
dval = strtod(src->data, &endptr);
13291329
(void) dval;

contrib/oid2name/oid2name.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ add_one_elt(char *eltname, eary *eary)
215215
{
216216
eary ->alloc *= 2;
217217
eary ->array = (char **) pg_realloc(eary->array,
218-
eary->alloc * sizeof(char *));
218+
eary->alloc * sizeof(char *));
219219
}
220220

221221
eary ->array[eary->num] = pg_strdup(eltname);

contrib/pg_archivecleanup/pg_archivecleanup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ main(int argc, char **argv)
299299
dryrun = true;
300300
break;
301301
case 'x':
302-
additional_ext = strdup(optarg); /* Extension to remove from
303-
* xlogfile names */
302+
additional_ext = strdup(optarg); /* Extension to remove
303+
* from xlogfile names */
304304
break;
305305
default:
306306
fprintf(stderr, "Try \"%s --help\" for more information.\n", progname);

contrib/pg_standby/pg_standby.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ main(int argc, char **argv)
593593
* There's no way to trigger failover via signal on Windows.
594594
*/
595595
(void) pqsignal(SIGUSR1, sighandler);
596-
(void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */
596+
(void) pqsignal(SIGINT, sighandler); /* deprecated, use SIGUSR1 */
597597
(void) pqsignal(SIGQUIT, sigquit_handler);
598598
#endif
599599

contrib/pg_test_timing/pg_test_timing.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static uint64 test_timing(int32);
1818
static void output(uint64 loop_count);
1919

2020
/* record duration in powers of 2 microseconds */
21-
int64 histogram[32];
21+
int64 histogram[32];
2222

2323
int
2424
main(int argc, char *argv[])
@@ -110,8 +110,11 @@ test_timing(int32 duration)
110110
uint64 total_time;
111111
int64 time_elapsed = 0;
112112
uint64 loop_count = 0;
113-
uint64 prev, cur;
114-
instr_time start_time, end_time, temp;
113+
uint64 prev,
114+
cur;
115+
instr_time start_time,
116+
end_time,
117+
temp;
115118

116119
total_time = duration > 0 ? duration * 1000000 : 0;
117120

@@ -120,7 +123,8 @@ test_timing(int32 duration)
120123

121124
while (time_elapsed < total_time)
122125
{
123-
int32 diff, bits = 0;
126+
int32 diff,
127+
bits = 0;
124128

125129
prev = cur;
126130
INSTR_TIME_SET_CURRENT(temp);
@@ -163,12 +167,13 @@ test_timing(int32 duration)
163167
static void
164168
output(uint64 loop_count)
165169
{
166-
int64 max_bit = 31, i;
170+
int64 max_bit = 31,
171+
i;
167172

168173
/* find highest bit value */
169174
while (max_bit > 0 && histogram[max_bit] == 0)
170175
max_bit--;
171-
176+
172177
printf("Histogram of timing durations:\n");
173178
printf("%6s %10s %10s\n", "< usec", "% of total", "count");
174179

@@ -179,6 +184,6 @@ output(uint64 loop_count)
179184
/* lame hack to work around INT64_FORMAT deficiencies */
180185
snprintf(buf, sizeof(buf), INT64_FORMAT, histogram[i]);
181186
printf("%6ld %9.5f %10s\n", 1l << i,
182-
(double) histogram[i] * 100 / loop_count, buf);
187+
(double) histogram[i] * 100 / loop_count, buf);
183188
}
184189
}

contrib/pg_trgm/trgm_op.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ get_wildcard_part(const char *str, int lenstr,
347347
else
348348
{
349349
/*
350-
* Back up endword to the escape character when stopping at
351-
* an escaped char, so that subsequent get_wildcard_part will
350+
* Back up endword to the escape character when stopping at an
351+
* escaped char, so that subsequent get_wildcard_part will
352352
* restart from the escape character. We assume here that
353353
* escape chars are single-byte.
354354
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy