Fix type of iterator variable in SH_START_ITERATE
Also add comment to make the reasoning behind the Assert() more explicit (per Tom). Reported-by: Ranier Vilela Discussion: https://postgr.es/m/CAEudQAocXNJ6s1VLz+hMamLAQAiewRoW17OJ6-+9GACKfj6iPQ@mail.gmail.com Backpatch: 11-
This commit is contained in:
parent
2e99ce68bc
commit
6143602eba
|
@ -760,7 +760,7 @@ SH_DELETE(SH_TYPE * tb, SH_KEY_TYPE key)
|
|||
SH_SCOPE void
|
||||
SH_START_ITERATE(SH_TYPE * tb, SH_ITERATOR * iter)
|
||||
{
|
||||
int i;
|
||||
uint32 i;
|
||||
uint64 startelem = PG_UINT64_MAX;
|
||||
|
||||
/*
|
||||
|
@ -779,6 +779,7 @@ SH_START_ITERATE(SH_TYPE * tb, SH_ITERATOR * iter)
|
|||
}
|
||||
}
|
||||
|
||||
/* we should have found an empty element */
|
||||
Assert(startelem < SH_MAX_SIZE);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue