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)
This commit is contained in:
Justin Hibbits 2019-09-28 02:49:46 +00:00
parent 1aa696babc
commit 4f0796edf8

View File

@ -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,