Skip to content

Commit d4cebec

Browse files
committed
fix various typos
1 parent be231f0 commit d4cebec

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ validate_range_opexpr(const Expr *expr,
976976
return false;
977977

978978
/* Fail fast if it's not an OpExpr node */
979-
if(!IsA(expr, OpExpr))
979+
if (!IsA(expr, OpExpr))
980980
return false;
981981

982982
/* Perform cast */

src/partition_filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ scan_result_parts_storage(Oid partid, ResultPartsStorage *parts_storage)
251251

252252
/* Lock partition and check if it exists */
253253
LockRelationOid(partid, parts_storage->head_open_lock_mode);
254-
if(!SearchSysCacheExists1(RELOID, ObjectIdGetDatum(partid)))
254+
if (!SearchSysCacheExists1(RELOID, ObjectIdGetDatum(partid)))
255255
{
256256
UnlockRelationOid(partid, parts_storage->head_open_lock_mode);
257257
return NULL;

src/rangeset.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ typedef struct {
3333
#define IR_COMPLETE false
3434

3535
#define IRANGE_SPECIAL_BIT ( (uint32) ( ((uint32) 1) << 31) )
36-
#define IRANGE_BONDARY_MASK ( (uint32) (~IRANGE_SPECIAL_BIT) )
36+
#define IRANGE_BOUNDARY_MASK ( (uint32) (~IRANGE_SPECIAL_BIT) )
3737

3838
#define InvalidIndexRange { 0, 0 }
3939

4040
#define is_irange_valid(irange) ( (irange.lower & IRANGE_SPECIAL_BIT) > 0 )
4141
#define is_irange_lossy(irange) ( (irange.upper & IRANGE_SPECIAL_BIT) > 0 )
42-
#define irange_lower(irange) ( (uint32) (irange.lower & IRANGE_BONDARY_MASK) )
43-
#define irange_upper(irange) ( (uint32) (irange.upper & IRANGE_BONDARY_MASK) )
42+
#define irange_lower(irange) ( (uint32) (irange.lower & IRANGE_BOUNDARY_MASK) )
43+
#define irange_upper(irange) ( (uint32) (irange.upper & IRANGE_BOUNDARY_MASK) )
4444

4545
#define lfirst_irange(lc) ( *(IndexRange *) lfirst(lc) )
4646
#define lappend_irange(list, irange) ( lappend((list), alloc_irange(irange)) )
@@ -53,8 +53,8 @@ typedef struct {
5353
inline static IndexRange
5454
make_irange(uint32 lower, uint32 upper, bool lossy)
5555
{
56-
IndexRange result = { lower & IRANGE_BONDARY_MASK,
57-
upper & IRANGE_BONDARY_MASK };
56+
IndexRange result = { lower & IRANGE_BOUNDARY_MASK,
57+
upper & IRANGE_BOUNDARY_MASK };
5858

5959
/* Set VALID */
6060
result.lower |= IRANGE_SPECIAL_BIT;
@@ -83,7 +83,7 @@ inline static uint32
8383
irb_pred(uint32 boundary)
8484
{
8585
if (boundary > 0)
86-
return (boundary - 1) & IRANGE_BONDARY_MASK;
86+
return (boundary - 1) & IRANGE_BOUNDARY_MASK;
8787

8888
return 0;
8989
}
@@ -92,8 +92,8 @@ irb_pred(uint32 boundary)
9292
inline static uint32
9393
irb_succ(uint32 boundary)
9494
{
95-
if (boundary >= IRANGE_BONDARY_MASK)
96-
return IRANGE_BONDARY_MASK;
95+
if (boundary >= IRANGE_BOUNDARY_MASK)
96+
return IRANGE_BOUNDARY_MASK;
9797

9898
return boundary + 1;
9999
}

tests/cmocka/rangeset_tests.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ test_irange_basic(void **state)
6464

6565
/* test irb_succ() */
6666
assert_int_equal(100, irb_succ(99));
67-
assert_int_equal(IRANGE_BONDARY_MASK, irb_succ(IRANGE_BONDARY_MASK));
68-
assert_int_equal(IRANGE_BONDARY_MASK, irb_succ(IRANGE_BONDARY_MASK + 1));
67+
assert_int_equal(IRANGE_BOUNDARY_MASK, irb_succ(IRANGE_BOUNDARY_MASK));
68+
assert_int_equal(IRANGE_BOUNDARY_MASK, irb_succ(IRANGE_BOUNDARY_MASK + 1));
6969

7070
/* test convenience macros */
71-
irange = make_irange(0, IRANGE_BONDARY_MASK, IR_LOSSY);
71+
irange = make_irange(0, IRANGE_BOUNDARY_MASK, IR_LOSSY);
7272
assert_int_equal(irange_lower(irange), 0);
73-
assert_int_equal(irange_upper(irange), IRANGE_BONDARY_MASK);
73+
assert_int_equal(irange_upper(irange), IRANGE_BOUNDARY_MASK);
7474
assert_true(is_irange_lossy(irange));
7575
assert_true(is_irange_valid(irange));
7676

0 commit comments

Comments
 (0)