10000 Remove redundant variable · postgrespro/pgsphere@df29542 · GitHub
[go: up one dir, main page]

Skip to content

Commit df29542

Browse files
df7cbmsdemlei
authored andcommitted
Remove redundant variable
1 parent 76e47dd commit df29542

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

moc.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ moc_debug(PG_FUNCTION_ARGS)
435435
static bool
436436
smoc_eq_impl(Smoc* moc_a, Smoc* moc_b)
437437
{
438-
int32 entry_size = MOC_INTERVAL_SIZE;
439438
int32 moc_a_end = VARSIZE(moc_a) - VARHDRSZ;
440439
int32 moc_b_end = VARSIZE(moc_b) - VARHDRSZ;
441440
char* moc_a_base = MOC_BASE(moc_a);
@@ -447,14 +446,14 @@ smoc_eq_impl(Smoc* moc_a, Smoc* moc_b)
447446
if (moc_a->order != moc_b->order || moc_a->first != moc_b->first || moc_a->last != moc_b->last || moc_a->area != moc_b->area)
448447
return false;
449448

450-
for (int j = moc_a->data_begin; j < moc_a_end; j += entry_size) // iterate over both in parallel
449+
for (int j = moc_a->data_begin; j < moc_a_end; j += MOC_INTERVAL_SIZE) // iterate over both in parallel
451450
{
452451
moc_interval *x;
453452
moc_interval *y;
454453
// page bumps
455-
int32 mod = (j + entry_size) % PG_TOAST_PAGE_FRAGMENT;
456-
if (mod > 0 && mod < entry_size)
457-
j += entry_size - mod;
454+
int32 mod = (j + MOC_INTERVAL_SIZE) % PG_TOAST_PAGE_FRAGMENT;
455+
if (mod > 0 && mod < MOC_INTERVAL_SIZE)
456+
j += MOC_INTERVAL_SIZE - mod;
458457
x = MOC_INTERVAL(moc_a_base, j);
459458
y = MOC_INTERVAL(moc_b_base, j);
460459

0 commit comments

Comments
 (0)
0