Merge pull request #2520 from citusdata/remove_memcpy

Remove odd memcpy usage in BuildCachedShardList
pull/2496/head
Marco Slot 2018-12-04 19:32:33 +01:00 committed by GitHub
commit 2967d8e65f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1223,9 +1223,8 @@ BuildCachedShardList(DistTableCacheEntry *cacheEntry)
{ {
GroupShardPlacement *srcPlacement = GroupShardPlacement *srcPlacement =
(GroupShardPlacement *) lfirst(placementCell); (GroupShardPlacement *) lfirst(placementCell);
GroupShardPlacement *dstPlacement = &placementArray[placementOffset];
memcpy(dstPlacement, srcPlacement, sizeof(GroupShardPlacement)); placementArray[placementOffset] = *srcPlacement;
placementOffset++; placementOffset++;
} }
MemoryContextSwitchTo(oldContext); MemoryContextSwitchTo(oldContext);