Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5f0bf6c

Browse files
committed
Run pgindent on remaining files now that LOOPBYTE is a usable macro.
1 parent 0c2c061 commit 5f0bf6c

File tree

6 files changed

+44
-44
lines changed

6 files changed

+44
-44
lines changed

contrib/hstore/hstore_gist.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ ghstore_compress(PG_FUNCTION_ARGS)
146146

147147
LOOPBYTE
148148
{
149-
if ((sign[i] & 0xff) != 0xff)
150-
PG_RETURN_POINTER(retval);
149+
if ((sign[i] & 0xff) != 0xff)
150+
PG_RETURN_POINTER(retval);
151151
}
152152

153153
res = (GISTTYPE *) palloc(CALCGTSIZE(ALLISTRUE));
@@ -169,7 +169,7 @@ ghstore_decompress(PG_FUNCTION_ARGS)
169169
{
170170
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
171171
GISTENTRY *retval;
172-
HStore *key;
172+
HStore *key;
173173

174174
key = (HStore *) PG_DETOAST_DATUM(entry->key);
175175

@@ -273,7 +273,7 @@ unionkey(BITVECP sbase, GISTTYPE * add)
273273
if (ISALLTRUE(add))
274274
return 1;
275275
LOOPBYTE
276-
sbase[i] |= sadd[i];
276+
sbase[i] |= sadd[i];
277277
return 0;
278278
}
279279

@@ -328,7 +328,7 @@ typedef struct
328328
{
329329
OffsetNumber pos;
330330
int4 cost;
331-
} SPLITCOST;
331+
} SPLITCOST;
332332

333333
static int
334334
comparecost(const void *a, const void *b)
@@ -470,7 +470,7 @@ ghstore_picksplit(PG_FUNCTION_ARGS)
470470
{
471471
ptr = GETSIGN(_j);
472472
LOOPBYTE
473-
union_l[i] |= ptr[i];
473+
union_l[i] |= ptr[i];
474474
}
475475
*left++ = j;
476476
v->spl_nleft++;
@@ -486,7 +486,7 @@ ghstore_picksplit(PG_FUNCTION_ARGS)
486486
{
487487
ptr = GETSIGN(_j);
488488
LOOPBYTE
489-
union_r[i] |= ptr[i];
489+
union_r[i] |= ptr[i];
490490
}
491491
*right++ = j;
492492
v->spl_nright++;
@@ -516,7 +516,7 @@ ghstore_consistent(PG_FUNCTION_ARGS)
516516

517517
sign = GETSIGN(entry);
518518

519-
if ( strategy == HStoreContainsStrategyNumber || strategy == 13 /* hack for old strats */ )
519+
if (strategy == HStoreContainsStrategyNumber || strategy == 13 /* hack for old strats */ )
520520
{
521521
HStore *query = PG_GETARG_HS(1);
522522
HEntry *qe = ARRPTR(query);
@@ -540,10 +540,10 @@ ghstore_consistent(PG_FUNCTION_ARGS)
540540
qe++;
541541
}
542542
}
543-
else if ( strategy == HStoreExistsStrategyNumber )
543+
else if (strategy == HStoreExistsStrategyNumber)
544544
{
545-
text *query = PG_GETARG_TEXT_P(1);
546-
int crc = crc32_sz( VARDATA(query), VARSIZE(query)-VARHDRSZ );
545+
text *query = PG_GETARG_TEXT_P(1);
546+
int crc = crc32_sz(VARDATA(query), VARSIZE(query) - VARHDRSZ);
547547

548548
res = (GETBIT(sign, HASHVAL(crc))) ? true : false;
549549
}

contrib/intarray/_intbig_gist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ typedef struct
319319
{
320320
OffsetNumber pos;
321321
int4 cost;
322-
} SPLITCOST;
322+
} SPLITCOST;
323323

324324
static int
325325
comparecost(const void *a, const void *b)

contrib/ltree/_ltree_gist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ typedef struct
272272
{
273273
OffsetNumber pos;
274274
int4 cost;
275-
} SPLITCOST;
275+
} SPLITCOST;
276276

277277
static int
278278
comparecost(const void *a, const void *b)

contrib/ltree/ltree_gist.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* GiST support for ltree
33
* Teodor Sigaev <teodor@stack.net>
4-
* $PostgreSQL: pgsql/contrib/ltree/ltree_gist.c,v 1.21 2007/11/16 00:13:02 momjian Exp $
4+
* $PostgreSQL: pgsql/contrib/ltree/ltree_gist.c,v 1.22 2007/11/16 01:12:24 momjian Exp $
55
*/
66

77
#include "ltree.h"
@@ -136,8 +136,8 @@ ltree_same(PG_FUNCTION_ARGS)
136136
{
137137
LOOPBYTE
138138
{
139-
if (sa[i] != sb[i])
140-
{
139+
if (sa[i] != sb[i])
140+
{
141141
*result = false;
142142
break;
143143
}
@@ -202,7 +202,7 @@ ltree_union(PG_FUNCTION_ARGS)
202202
BITVECP sc = LTG_SIGN(cur);
203203

204204
LOOPBYTE
205-
((unsigned char *) base)[i] |= sc[i];
205+
((unsigned char *) base)[i] |= sc[i];
206206
}
207207

208208
curtree = LTG_LNODE(cur);
@@ -347,7 +347,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
347347
BITVECP sc = LTG_SIGN(lu);
348348

349349
LOOPBYTE
350-
((unsigned char *) ls)[i] |= sc[i];
350+
((unsigned char *) ls)[i] |= sc[i];
351351
}
352352
}
353353
}
@@ -368,7 +368,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
368368
BITVECP sc = LTG_SIGN(lu);
369369

370370
LOOPBYTE
371-
((unsigned char *) rs)[i] |= sc[i];
371+
((unsigned char *) rs)[i] |= sc[i];
372372
}
373373
}
374374
}

contrib/pg_trgm/trgm_gist.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ gtrgm_compress(PG_FUNCTION_ARGS)
115115

116116
LOOPBYTE
117117
{
118-
if ((sign[i] & 0xff) != 0xff)
119-
PG_RETURN_POINTER(retval);
118+
if ((sign[i] & 0xff) != 0xff)
119+
PG_RETURN_POINTER(retval);
120120
}
121121

122122
len = CALCGTSIZE(SIGNKEY | ALLISTRUE, 0);
@@ -137,7 +137,7 @@ gtrgm_decompress(PG_FUNCTION_ARGS)
137137
{
138138
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
139139
GISTENTRY *retval;
140-
text *key;
140+
text *key;
141141

142142
key = DatumGetTextP(entry->key);
143143

@@ -212,7 +212,7 @@ unionkey(BITVECP sbase, TRGM * add)
212212
return 1;
213213

214214
LOOPBYTE
215-
sbase[i] |= sadd[i];
215+
sbase[i] |= sadd[i];
216216
}
217217
else
218218
{
@@ -327,7 +327,7 @@ sizebitvec(BITVECP sign)
327327
i;
328328

329329
LOOPBYTE
330-
size += number_of_ones[(unsigned char) sign[i]];
330+
size += number_of_ones[(unsigned char) sign[i]];
331331
return size;
332332
}
333333

@@ -394,10 +394,10 @@ typedef struct
394394
{
395395
bool allistrue;
396396
BITVEC sign;
397-
} CACHESIGN;
397+
} CACHESIGN;
398398

399399
static void
400-
fillcache(CACHESIGN * item, TRGM * key)
400+
fillcache(CACHESIGN *item, TRGM * key)
401401
{
402402
item->allistrue = false;
403403
if (ISARRKEY(key))
@@ -413,7 +413,7 @@ typedef struct
413413
{
414414
OffsetNumber pos;
415415
int4 cost;
416-
} SPLITCOST;
416+
} SPLITCOST;
417417

418418
static int
419419
comparecost(const void *a, const void *b)
@@ -426,7 +426,7 @@ comparecost(const void *a, const void *b)
426426

427427

428428
static int
429-
hemdistcache(CACHESIGN * a, CACHESIGN * b)
429+
hemdistcache(CACHESIGN *a, CACHESIGN *b)
430430
{
431431
if (a->allistrue)
432432
{

src/backend/utils/adt/tsgistidx.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/tsgistidx.c,v 1.5 2007/11/16 00:13:02 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/tsgistidx.c,v 1.6 2007/11/16 01:12:24 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -50,7 +50,7 @@ typedef char *BITVECP;
5050

5151
typedef struct
5252
{
53-
int32 vl_len_; /* varlena header (do not touch directly!) */
53+
int32 vl_len_; /* varlena header (do not touch directly!) */
5454
int4 flag;
5555
char data[1];
5656
} SignTSVector;
@@ -133,8 +133,8 @@ gtsvectorout(PG_FUNCTION_ARGS)
133133
static int
134134
compareint(const void *va, const void *vb)
135135
{
136-
int4 a = *((int4 *) va);
137-
int4 b = *((int4 *) vb);
136+
int4 a = *((int4 *) va);
137+
int4 b = *((int4 *) vb);
138138

139139
if (a == b)
140140
return 0;
@@ -167,7 +167,7 @@ uniqueint(int4 *a, int4 l)
167167
}
168168

169169
static void
170-
makesign(BITVECP sign, SignTSVector * a)
170+
makesign(BITVECP sign, SignTSVector *a)
171171
{
172172
int4 k,
173173
len = ARRNELEM(a);
@@ -252,8 +252,8 @@ gtsvector_compress(PG_FUNCTION_ARGS)
252252

253253
LOOPBYTE
254254
{
255-
if ((sign[i] & 0xff) != 0xff)
256-
PG_RETURN_POINTER(retval);
255+
if ((sign[i] & 0xff) != 0xff)
256+
PG_RETURN_POINTER(retval);
257257
}
258258

259259
len = CALCGTSIZE(SIGNKEY | ALLISTRUE, 0);
@@ -299,7 +299,7 @@ typedef struct
299299
* is there value 'val' in array or not ?
300300
*/
301301
static bool
302-
checkcondition_arr(void *checkval, QueryOperand * val)
302+
checkcondition_arr(void *checkval, QueryOperand *val)
303303
{
304304
int4 *StopLow = ((CHKVAL *) checkval)->arrb;
305305
int4 *StopHigh = ((CHKVAL *) checkval)->arre;
@@ -322,7 +322,7 @@ checkcondition_arr(void *checkval, QueryOperand * val)
322322
}
323323

324324
static bool
325-
checkcondition_bit(void *checkval, QueryOperand * val)
325+
checkcondition_bit(void *checkval, QueryOperand *val)
326326
{
327327
return GETBIT(checkval, HASHVAL(val->valcrc));
328328
}
@@ -364,7 +364,7 @@ gtsvector_consistent(PG_FUNCTION_ARGS)
364364
}
365365

366366
static int4
367-
unionkey(BITVECP sbase, SignTSVector * add)
367+
unionkey(BITVECP sbase, SignTSVector *add)
368368
{
369369
int4 i;
370370

@@ -487,7 +487,7 @@ sizebitvec(BITVECP sign)
487487
i;
488488

489489
LOOPBYTE
490-
size += number_of_ones[(unsigned char) sign[i]];
490+
size += number_of_ones[(unsigned char) sign[i]];
491491
return size;
492492
}
493493

@@ -507,7 +507,7 @@ hemdistsign(BITVECP a, BITVECP b)
507507
}
508508

509509
static int
510-
hemdist(SignTSVector * a, SignTSVector * b)
510+
hemdist(SignTSVector *a, SignTSVector *b)
511511
{
512512
if (ISALLTRUE(a))
513513
{
@@ -557,7 +557,7 @@ typedef struct
557557
} CACHESIGN;
558558

559559
static void
560-
fillcache(CACHESIGN * item, SignTSVector * key)
560+
fillcache(CACHESIGN *item, SignTSVector *key)
561561
{
562562
item->allistrue = false;
563563
if (ISARRKEY(key))
@@ -578,8 +578,8 @@ typedef struct
578578
static int
579579
comparecost(const void *va, const void *vb)
580580
{
581-
SPLITCOST *a = (SPLITCOST *) va;
582-
SPLITCOST *b = (SPLITCOST *) vb;
581+
SPLITCOST *a = (SPLITCOST *) va;
582+
SPLITCOST *b = (SPLITCOST *) vb;
583583

584584
if (a->cost == b->cost)
585585
return 0;
@@ -589,7 +589,7 @@ comparecost(const void *va, const void *vb)
589589

590590

591591
static int
592-
hemdistcache(CACHESIGN * a, CACHESIGN * b)
592+
hemdistcache(CACHESIGN *a, CACHESIGN *b)
593593
{
594594
if (a->allistrue)
595595
{

0 commit comments

Comments
 (0)