summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/common
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2013-06-24 11:27:03 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-07-08 10:16:00 -0500
commit0e8072c8c3aa49ce9e75c468f4e14e80893d56f0 (patch)
treebf64388902a9fc35d016560720e1eaaa69e9ea79 /src/usr/hwas/common
parent47e1255f110771d5042e322d207111abcd430bc3 (diff)
downloadtalos-hostboot-0e8072c8c3aa49ce9e75c468f4e14e80893d56f0.tar.gz
talos-hostboot-0e8072c8c3aa49ce9e75c468f4e14e80893d56f0.zip
minor issue, add tests for bus callouts
correct minor issue, make code a little more clear, and add tests for bus callouts. Change-Id: I47d488cab60098ede3339e4c6a3820348c52acae RTC: 76254 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5169 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/common')
-rw-r--r--src/usr/hwas/common/hwasCallout.C8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr/hwas/common/hwasCallout.C b/src/usr/hwas/common/hwasCallout.C
index fd766bc5a..78153fb00 100644
--- a/src/usr/hwas/common/hwasCallout.C
+++ b/src/usr/hwas/common/hwasCallout.C
@@ -57,11 +57,11 @@ bool retrieveTarget(uint8_t * & io_uData,
{
// convert the EntityPath to a Target pointer
TARGETING::EntityPath ep, *ep_ptr;
- uint32_t size;
ep_ptr = (TARGETING::EntityPath *)io_uData;
- size = TARGETING::EntityPath::MAX_PATH_ELEMENTS - ep_ptr->size();
- size *= sizeof(TARGETING::EntityPath::PathElement);
- size = sizeof(ep) - size;
+ // size is total EntityPath size minus unused path elements
+ uint32_t size = sizeof(*ep_ptr) -
+ (TARGETING::EntityPath::MAX_PATH_ELEMENTS - ep_ptr->size()) *
+ sizeof(TARGETING::EntityPath::PathElement);
memcpy(&ep, io_uData, size);
o_pTarget = TARGETING::targetService().toTarget(ep);
io_uData += size;
OpenPOWER on IntegriCloud