diff options
| author | Andres Freund | 2023-07-06 15:34:17 +0000 |
|---|---|---|
| committer | Andres Freund | 2023-07-06 16:57:33 +0000 |
| commit | 6143602ebaab4fb7c8fca64bbbc246710b5c5ee6 (patch) | |
| tree | 30994ef6b3fdfc98a7ff6851d5eda53130487d23 /src/include | |
| parent | 2e99ce68bcd22d41d417cdd05ccd47d54c30a2a0 (diff) | |
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-
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/lib/simplehash.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h index de6a2ac6458..022d72344c4 100644 --- a/src/include/lib/simplehash.h +++ b/src/include/lib/simplehash.h @@ -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); /* |
