Replace gratuitous memmove() with memcpy()
Peter Eisentraut <peter@eisentraut.org>
Replace gratuitous memmove() with memcpy() The index access methods all had similar code that copied the passed-in scan keys to local storage. They all used memmove() for that, which is not wrong, but it seems confusing not to use memcpy() when that would work. Presumably, this was all once copied from ancient code and never adjusted. Discussion: https://www.postgresql.org/message-id/flat/f8c739d9-f48d-4187-b214-df3391ba41ab@eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| contrib/bloom/blscan.c | modified | +1 −4 |
| src/backend/access/brin/brin.c | modified | +1 −2 |
| src/backend/access/gin/ginscan.c | modified | +1 −4 |
| src/backend/access/gist/gistscan.c | modified | +2 −4 |
| src/backend/access/hash/hash.c | modified | +1 −5 |
| src/backend/access/nbtree/nbtree.c | modified | +1 −3 |
| src/backend/access/spgist/spgscan.c | modified | +2 −4 |
Discussion
- Don't overwrite scan key in systable_beginscan() 11 messages · 2024-08-08 → 2024-12-03