aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2019-09-28 02:49:46 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2019-09-28 02:49:46 +0000
commit4f0796edf886d17a59cfd53e931d03850a61b635 (patch)
tree040825390a2bef4919e2b0253c240d9ee9622575 /sys
parent1aa696babcb1ece29950af9480bc645b636c9e6b (diff)
downloadsrc-4f0796edf886d17a59cfd53e931d03850a61b635.tar.gz
src-4f0796edf886d17a59cfd53e931d03850a61b635.zip
dpaa(4): Fix memcpy size for threshold copy in NCSW contrib
On 64-bit platforms uintptr_t makes the copy twice as large as it should be. This code isn't actually used in FreeBSD, since it's for guest mode only, not hypervisor mode, but fixing it for completeness sake. Reported by: bdragon (clang9 build)
Notes
Notes: svn path=/head/; revision=352831
Diffstat (limited to 'sys')
-rw-r--r--sys/contrib/ncsw/Peripherals/BM/bm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/contrib/ncsw/Peripherals/BM/bm.c b/sys/contrib/ncsw/Peripherals/BM/bm.c
index 2b31620a7467..646e38fb9695 100644
--- a/sys/contrib/ncsw/Peripherals/BM/bm.c
+++ b/sys/contrib/ncsw/Peripherals/BM/bm.c
@@ -258,7 +258,7 @@ t_Error BmSetPoolThresholds(t_Handle h_Bm, uint8_t bpid, const uint32_t *thresho
memset(&msg, 0, sizeof(t_BmIpcMsg));
ipcPoolThresh.bpid = bpid;
- memcpy(ipcPoolThresh.thresholds, thresholds, sizeof(uintptr_t) * MAX_DEPLETION_THRESHOLDS);
+ memcpy(ipcPoolThresh.thresholds, thresholds, sizeof(uint32_t) * MAX_DEPLETION_THRESHOLDS);
msg.msgId = BM_SET_POOL_THRESH;
memcpy(msg.msgBody, &ipcPoolThresh, sizeof(t_BmIpcPoolThreshParams));
if ((errCode = XX_IpcSendMessage(p_Bm->h_Session,