diff options
| author | Peter Eisentraut | 2024-09-11 13:15:49 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2024-09-11 13:21:36 +0000 |
| commit | 8b5c6a54c4396bb9daeb9ec5d9cbb0d3deedcbe3 (patch) | |
| tree | 437b1aaa5d0ee2b9c7a5aae05657a0acfcbaa0cb /contrib/bloom | |
| parent | 842265631dfd9e5583d934e2ae328b09bc4b2f8b (diff) | |
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
Diffstat (limited to 'contrib/bloom')
| -rw-r--r-- | contrib/bloom/blscan.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/contrib/bloom/blscan.c b/contrib/bloom/blscan.c index 0a303a49b24..94b6b449c8c 100644 --- a/contrib/bloom/blscan.c +++ b/contrib/bloom/blscan.c @@ -55,10 +55,7 @@ blrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys, so->sign = NULL; if (scankey && scan->numberOfKeys > 0) - { - memmove(scan->keyData, scankey, - scan->numberOfKeys * sizeof(ScanKeyData)); - } + memcpy(scan->keyData, scankey, scan->numberOfKeys * sizeof(ScanKeyData)); } /* |
